@font-face {
  font-family: Poppins;
  font-weight: 700;
  font-display: swap;
  src: url(/poppins-700.woff2) format("woff2");
}

:root {
  --bg: #fefdfa;
  --text: #22201c;
  --muted: #6b655c;
  --rule: #ebe6dc;
  --accent: #9e663c;
  --line: #dccaab;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18;
    --text: #ece7df;
    --muted: #a39b8f;
    --rule: #34312c;
    --accent: #d6a47c;
    --line: #5c4c38;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 42rem;
  padding: 1.5rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

nav.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  margin-bottom: 4rem;
}
nav.top a { color: var(--muted); text-decoration: none; }
nav.top a:hover { color: var(--accent); }
nav.top a.logo {
  font: 700 1.75rem/1 Poppins, var(--sans);
  color: var(--accent);
}

/* Screenshot of a link's page that rises in on hover (bin/build's preview) */
.preview { position: relative; display: inline-block; }
.preview .card { display: none; }
@media (hover: hover) and (pointer: fine) {
  .preview .card {
    display: block;
    position: absolute;
    z-index: 5;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    width: 240px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--rule), 0 18px 40px -12px rgb(0 0 0 / 0.35);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px) scale(0.92) rotate(-1.5deg);
    transform-origin: 50% 100%;
    transition: opacity 0.18s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.35s;
  }
  .preview .card img { display: block; width: 100%; height: auto; border-radius: 8px; }
  .preview:hover .card, .preview:focus-within .card {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1) rotate(0);
    transition-delay: 0.12s, 0.12s, 0s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .preview .card { transform: translate(-50%, 0); transition: opacity 0.15s, visibility 0s linear 0.15s; }
}

/* LinkedIn, GitHub and email down the left edge, over a thin line */
ul.side { display: none; }
@media (min-width: 64rem) {
  ul.side {
    position: fixed;
    left: 40px;
    bottom: 0;
    width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  ul.side::after { content: ""; width: 1px; height: 90px; margin-top: 20px; background: var(--line); }
  ul.side a { display: block; padding: 10px; color: var(--text); transition: transform 0.25s, color 0.25s; }
  ul.side a:hover, ul.side a:focus-visible { color: var(--accent); transform: translateY(-5px); }
  ul.side svg { display: block; width: 20px; height: 20px; fill: currentColor; }
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2.25rem, 7vw, 3rem); margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h2 {
  font-size: 0.8125rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.1875rem; margin: 0; }
h3 a { color: inherit; text-decoration-color: var(--rule); }
h3 a:hover { color: var(--accent); }

.lede { font-size: 1.1875rem; color: var(--muted); margin: 0 0 1.25rem; }

ul.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

article { margin-bottom: 1.75rem; }
article p { margin: 0.25rem 0 0; }

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Resume */
.summary { font-size: 1.0625rem; margin-top: 2.5rem; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.when { color: var(--muted); font-size: 0.875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.note { color: var(--muted); }
.resume ul:not(.links) { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.resume li { margin-bottom: 0.35rem; }
.resume li::marker { color: var(--muted); }
.resume strong { font-weight: 600; }
.resume ul.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.resume ul.tags li { margin: 0; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--rule); color: var(--muted); font-size: 0.8125rem; }

dl.skills { display: grid; grid-template-columns: 12rem 1fr; gap: 0.5rem 1.5rem; margin: 0; }
dl.skills dt { font-weight: 600; }
dl.skills dd { margin: 0; color: var(--muted); }
@media (max-width: 34rem) {
  dl.skills { grid-template-columns: 1fr; gap: 0; }
  dl.skills dd { margin-bottom: 0.75rem; }
}

/* Posts */
.series { color: var(--muted); font-size: 0.9375rem; margin: 0 0 1.25rem; }
.series a { color: inherit; }
.post .lede { margin-top: -0.25rem; }

/* Case studies */
.case main p { margin: 0 0 1rem; }
.case main ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.case main li { margin-bottom: 0.6rem; }
.case main li::marker { color: var(--muted); }
.case strong { font-weight: 600; }
.case code { font-size: 0.875em; padding: 0.05em 0.3em; border-radius: 4px; background: var(--rule); }

@media print {
  :root { --bg: #fff; --text: #000; --muted: #444; --rule: #ccc; --accent: #000; }
  body { max-width: none; padding: 0; font-size: 10pt; }
  nav.top, ul.side { display: none; }
  h2 { margin-top: 1.25rem; }
  a { text-decoration: none; }
  article { break-inside: avoid; }
}
