:root {
  --paper: #F2F3EF;
  --surface: #FFFFFF;
  --ink: #18212B;
  --muted: #5E6A74;
  --rule: #D5D9D3;
  --canyon: #9A4A26;
  --cobalt: #2B4ACB;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12171D;
    --surface: #181F26;
    --ink: #E6E8E3;
    --muted: #98A2AB;
    --rule: #2A323B;
    --canyon: #E08A5F;
    --cobalt: #8EA2FF;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

main { padding-top: clamp(3rem, 8vw, 6rem); }

a {
  color: var(--cobalt);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-color: var(--cobalt); }
}

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

/* Header */
.identity {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.identity img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}
h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.identity p { margin: 0.5rem 0 0; }
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 479px) {
  .identity { flex-direction: column; gap: 1rem; }
}

section { margin-top: 3.5rem; }

h2 {
  position: relative;
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}
.anchor {
  position: absolute;
  left: -1.25rem;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 150ms ease;
}
@media (max-width: 639px) {
  .anchor { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  h2:hover .anchor { opacity: 1; }
}
.anchor:focus-visible { opacity: 1; }

/* Now */
dl { margin: 0; }
.now div { padding: 0.5rem 0; }
.now dt { font-weight: 500; }
.now dt a { color: var(--ink); }
.now dd { margin: 0; color: var(--muted); }

/* Before */
.before { margin: 0; padding: 0; list-style: none; }
.before li {
  display: grid;
  grid-template-columns: 5.5rem 12rem 1fr;
  column-gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--rule);
}
.before li:first-child { border-top: 1px solid var(--rule); }
.yr { color: var(--muted); font-variant-numeric: tabular-nums; }
.co { font-weight: 500; }
@media (max-width: 639px) {
  .before li { display: block; }
  .yr { display: block; }
  .co, .role { display: inline; }
  .co::after { content: ", "; font-weight: 400; }
}

.lines { margin: 0; padding: 0; list-style: none; }
.lines li { padding: 0.125rem 0; }

footer {
  padding-top: 3.5rem;
  padding-bottom: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}
footer p { margin: 0; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Load moment */
@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes enter-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.enter {
  animation: enter 500ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@media (prefers-reduced-motion: reduce) {
  .enter {
    animation: enter-fade 200ms ease both;
    animation-delay: calc(var(--i, 0) * 60ms);
  }
}

/* Buttons */
.btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 2rem;
  padding: 0 0.875rem;
  font: 500 14px/1 var(--sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--paper); color: var(--ink); }
  .btn-primary:hover { background: var(--muted); color: var(--paper); border-color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition-property: background-color, color; transition-duration: 150ms; }
  .btn:active { transform: none; }
}

/* Hire and FAQ (portfolio) */
.hire p { margin: 0 0 0.75rem; }
.hire .lines { margin-bottom: 1.25rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (hover: hover) and (pointer: fine) {
  .hire .btn:not(.btn-primary):hover { background: var(--surface); }
}
.faq div { padding: 0.5rem 0; }
.faq dt { font-weight: 500; }
.faq dd { margin: 0; color: var(--muted); }

/* 404 */
.nf p { margin: 0 0 1rem; }
.topnav { margin: 0 0 2rem; font-size: 0.875rem; }
.muted { color: var(--muted); }
.muted-line { margin: 1.25rem 0 0; color: var(--muted); }

