@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fff;
  --bg-alt: #f2f2f2;
  --ink: #111;
  --ink-2: #444;
  --muted: #767676;
  --line: #e4e4e4;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;

  --fs-hero: clamp(2.6rem, 6vw, 4.75rem);
  --fs-xl: clamp(2.2rem, 4.6vw, 3.8rem);
  --fs-lg: clamp(1.5rem, 2.4vw, 2rem);
  --fs-md: clamp(1.15rem, 1.5vw, 1.35rem);
  --fs-body: 1.0625rem;
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;

  --container: 1200px;
  --narrow: 720px;
  --gutter: clamp(16px, 5vw, 64px);
  --section: clamp(72px, 10vw, 144px);
  --gap: clamp(24px, 3vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
main { flex: 1; }

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul[role="list"] { list-style: none; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { max-width: var(--narrow); }
.section { padding-block: var(--section); }

/* Type */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.h-hero { font-size: var(--fs-hero); line-height: .95; letter-spacing: -.045em; }
.h-xl { font-size: var(--fs-xl); }
p { text-wrap: pretty; }

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(20px, 2.4vw, 32px);
}

/* Links */

.actions { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: clamp(28px, 3.5vw, 44px); font-weight: 500; font-size: var(--fs-sm); }
.actions a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.actions a:hover { text-decoration-thickness: 2px; }
.icon-link { display: inline-flex; align-items: center; gap: 8px; }
.icon { width: 1.1em; height: 1.1em; flex: none; }
.actions .icon { width: 1.25em; height: 1.25em; }

/* Header & footer */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
.nav { display: flex; gap: clamp(14px, 2.5vw, 28px); font-size: var(--fs-sm); color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.site-footer { border-top: 1px solid var(--line); padding-block: 32px; font-size: var(--fs-xs); color: var(--muted); }

/* Home */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  padding-top: clamp(48px, 7vw, 96px);
}
.headshot {
  width: clamp(120px, 16vw, 176px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}
.hero .eyebrow { margin-bottom: 14px; }
.role + .role::before { content: "|"; margin-inline: 1.1em; opacity: .5; }
.hero .actions { margin-top: 20px; }
.hero + .section { padding-top: clamp(56px, 7vw, 96px); }

.post-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 600px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .post-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.post-card:hover { border-color: #cfcfcf; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35); transform: translateY(-2px); }
.post-card-image { aspect-ratio: 16 / 10; background: var(--bg-alt); border-bottom: 1px solid var(--line); overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.post-card-image.is-pixel-art img { object-fit: cover; padding: 0; image-rendering: pixelated; }
.post-card-body { padding: 20px 22px 24px; }
.post-card h2 { font-size: var(--fs-md); letter-spacing: -.02em; }
.post-card p { margin-top: 8px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }

/* Experience */

.section + .section { padding-top: 0; }
.jobs { list-style: none; border-top: 1px solid var(--line); }
.job {
  display: grid;
  gap: 20px;
  padding-block: clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .job { grid-template-columns: 128px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); } }
.job-logo {
  position: relative;
  width: 72px;
  aspect-ratio: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}
@media (min-width: 720px) { .job-logo { width: 100%; } }
.job-logo img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; }
.job-head h3 { font-size: var(--fs-md); letter-spacing: -.02em; }
.job-dates { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.job-blurb a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.job-blurb a:hover { text-decoration-thickness: 2px; }
.job-blurb { margin-top: 10px; max-width: 68ch; color: var(--ink-2); }

/* Project pages */

.article-head { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(32px, 4vw, 56px); }
.article-head h1 { font-size: var(--fs-xl); }
.article-title { display: flex; align-items: center; gap: clamp(18px, 3vw, 28px); }
.article-logo { width: clamp(64px, 9vw, 96px); aspect-ratio: 1; border-radius: 14px; flex: none; }
.meta { margin-top: 16px; font-size: var(--fs-xs); color: var(--muted); letter-spacing: .04em; }

.prose { max-width: 66ch; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hanging-punctuation: first;
}
@media (max-width: 600px) { .prose p, .prose li { text-align: left; } }
.prose h2 { font-size: var(--fs-md); letter-spacing: -.02em; color: var(--ink); margin-top: 2.4em; }
.prose h3, .prose h4 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin-top: 2em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .5em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; padding: .1em .35em; background: var(--bg-alt); border-radius: 4px; }
.prose > img, .prose figure { margin-block: 2em; }
.prose figure img { max-height: 360px; width: auto; border: 1px solid var(--line); }
.prose figcaption { margin-top: .6em; font-size: var(--fs-sm); color: var(--muted); }
article { padding-bottom: var(--section); }
