:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --text: #1d1d1f;
  --muted: #737373;
  --faint: #a3a3a3;
  --line: rgba(0, 0, 0, 0.10);
  --soft: rgba(0, 0, 0, 0.035);
  --code-bg: #efefec;
  --selection: #d7d7d2;
  --content: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --text: #eeeeec;
    --muted: #969696;
    --faint: #696969;
    --line: rgba(255, 255, 255, 0.11);
    --soft: rgba(255, 255, 255, 0.035);
    --code-bg: #191919;
    --selection: #343434;
  }
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection); }

a {
  color: inherit;
  text-decoration-color: var(--faint);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: currentColor; }

img {
  max-width: 100%;
  height: auto;
}

.site-shell {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 72px;
}

.site-mark {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.015em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.site-nav a {
  text-decoration: none;
  transition: color 120ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

main { min-width: 0; }

.hero {
  margin-bottom: 64px;
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 5vw, 2.35rem);
  line-height: 1.15;
}

h2 {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
}

h3 {
  margin: 32px 0 8px;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

p { margin: 0 0 16px; }

.lede {
  max-width: 39rem;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.muted { color: var(--muted); }

.section {
  margin-top: 56px;
}

.section-intro {
  color: var(--muted);
  margin: -8px 0 18px;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.item:last-child { border-bottom: 1px solid var(--line); }

.item-main { min-width: 0; }

.item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.item-title a {
  text-decoration: none;
}

.item-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.item-description {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.item-meta {
  align-self: start;
  padding-top: 1px;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.item:hover .item-title { text-decoration: underline; text-underline-offset: 3px; }
.item:hover .item-meta { color: var(--text); }

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.inline-links a { text-decoration: none; }
.inline-links a:hover { color: var(--text); }

.article-header {
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prose h2 {
  margin-top: 48px;
  margin-bottom: 12px;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.prose h3 { margin-top: 32px; }

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 18px;
}

.prose li { margin: 5px 0; }

.prose hr,
hr {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 40px 0;
}

.prose img,
.project-image {
  display: block;
  width: 100%;
  margin: 24px 0 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

code {
  padding: 0.12rem 0.28rem;
  border-radius: 3px;
  background: var(--code-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

pre,
.prose code:only-child {
  display: block;
  overflow-x: auto;
  margin: 12px 0 20px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text);
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.note {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 80px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 600px) {
  .site-shell {
    width: min(calc(100% - 32px), var(--content));
    padding-top: 30px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 52px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 12px;
  }

  .hero { margin-bottom: 52px; }
  .section { margin-top: 48px; }

  .item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .item-meta { grid-row: 1; }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
