:root {
  --bg: #fcfcfd;
  --text: #1a1a2e;
  --muted: #6b7280;
  --link: #1971c2;
  --line: #e8e8ec;
  --code-bg: #f2f3f5;
  --max-width: 800px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #111214;
  --text: #ededf0;
  --muted: #9a9da5;
  --link: #74b7f2;
  --line: #303238;
  --code-bg: #202226;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; }

.shell { max-width: var(--max-width); margin: 0 auto; }

.site-header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
}

.site-nav { display: flex; align-items: center; gap: 22px; width: 100%; }
.site-nav a {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { font-weight: 600; }

.theme-toggle {
  margin-left: auto;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}
.theme-toggle:hover { color: var(--text); }

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.eyebrow::before { content: none; }

.page-intro { padding: 32px 0 34px; }
.page-intro h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.page-intro .eyebrow { margin-bottom: 5px; }
.page-intro > p:last-child { margin-bottom: 0; color: var(--muted); }
.page-intro .github-activity { margin-top: 12px; font-size: 14px; }

.archive { padding-bottom: 24px; }
.archive-year { margin-bottom: 36px; }
.archive-year > h2 {
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.archive-posts article {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
}
.archive-posts time { padding-top: 3px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.archive-posts h3 { margin: 0 0 2px; font-size: 17px; font-weight: 600; line-height: 1.5; }
.archive-posts h3 a { color: var(--text); }
.archive-posts p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.post { max-width: 700px; padding: 28px 0 30px; }
.back-link { display: inline-block; margin-bottom: 22px; font-size: 14px; }
.post-header { margin-bottom: 32px; }
.post-header h1 { margin: 0 0 10px; font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.post-dek { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.post-meta { display: flex; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.post-hero { margin: 0 0 32px; }
.post-hero figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }

.prose { font-size: 16px; line-height: 1.8; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose h2 { margin: 32px 0 12px; font-size: 24px; font-weight: 700; line-height: 1.4; }
.prose h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 600; }
.prose blockquote { margin: 24px 0; padding-left: 16px; border-left: 3px solid var(--line); color: var(--muted); }
.prose code { padding: .1em .35em; border-radius: 4px; background: var(--code-bg); font-family: var(--mono); font-size: .9em; }
.prose pre { overflow-x: auto; margin: 24px 0; padding: 18px; border-radius: 6px; background: var(--code-bg); }
.prose pre code { padding: 0; background: transparent; }
.prose img { margin: 24px 0; }

.post-end { margin-top: 42px; padding-top: 18px; border-top: 1px solid var(--line); }
.post-end span { display: none; }
.post-end p { margin: 0; color: var(--muted); font-size: 13px; }

.about { padding-top: 16px; }
.about-hero { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 40px; }
.about-hero > img { width: 80px; height: 80px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.about-hero h1 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.about-links li { margin: 0; font-size: 14px; line-height: 1.6; }
.about-section { margin: 0 0 36px; }
.about-section h2 {
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.about-summary p { margin: 0 0 12px; font-size: 16px; line-height: 1.8; }
.about-summary p:last-child { margin-bottom: 0; }
.entries { margin: 0; padding: 0; list-style: none; }
.entry { margin: 0 0 20px; }
.entry:last-child { margin-bottom: 0; }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.entry-name { font-size: 17px; font-weight: 600; }
.entry-name a { color: var(--text); }
.entry-period { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-role { margin-top: 2px; color: var(--muted); font-size: 14px; }
.entry-desc { margin: 4px 0 0 !important; color: var(--text); font-size: 15px; line-height: 1.7; }

.project-list { padding-bottom: 24px; }
.project-card { padding: 20px 0; border-top: 1px solid var(--line); }
.project-number { display: none; }
.project-card .eyebrow { margin-bottom: 2px; }
.project-card h2 { margin: 0 0 5px; font-size: 18px; font-weight: 600; }
.project-card h2 a { color: var(--text); }
.project-card p:not(.eyebrow) { max-width: 680px; margin: 0 0 7px; color: var(--text); font-size: 15px; }
.project-card > div:last-child > a { font-size: 14px; }
.empty-state { margin: 0; padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); }

.project-detail { max-width: 700px; padding: 28px 0 30px; }
.project-detail-header { margin-bottom: 32px; }
.project-detail-header .eyebrow { margin: 20px 0 3px; }
.project-detail-header h1 { margin: 0 0 8px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.project-summary { margin: 0; color: var(--muted); font-size: 16px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 14px; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 18px; }
.post-row { padding: 16px 0; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 16px; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214;
    --text: #ededf0;
    --muted: #9a9da5;
    --link: #74b7f2;
    --line: #303238;
    --code-bg: #202226;
  }
}

@media (max-width: 600px) {
  .site-header { padding: 16px 0; }
  .site-nav { flex-wrap: wrap; gap: 8px 16px; }
  .theme-toggle { margin-left: 0; }
  .page-intro { padding-top: 24px; }
  .archive-posts article { grid-template-columns: 1fr; gap: 2px; }
  .archive-posts time { padding-top: 0; }
  .about-hero { gap: 16px; }
  .post-header h1 { font-size: 30px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}
