:root {
  --bg: #fff;
  --fg: #242424;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --link: #0000ee;
  --max: 820px;
  --ui-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --prose-font: Georgia, Cambria, "Times New Roman", Times, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #f2f2f2;
    --muted: #a8a8a8;
    --line: #222;
  }

  a {
    color: #d7e7ff;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font: 16px/1.5 var(--ui-font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a[href^="http://"],
a[href^="https://"] {
  color: var(--link);
}

.internal-link {
  color: inherit;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 18px 80px;
}

header {
  margin-bottom: 44px;
}

.blog-header,
.article-header,
.article-list,
.article-body {
  max-width: 680px;
}

.author-bio {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.author-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.blog-header .author-bio p {
  margin: 0;
  font-family: var(--ui-font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: normal;
}

.article-list {
  border-top: 1px solid var(--line);
}

.article-summary {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.article-summary h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

#latest-writing {
  font-size: 28px;
}

.article-summary h3 a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

.article-header .article-date,
.article-header .article-source {
  font-family: var(--ui-font);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: normal;
}

.empty-state {
  margin: 28px 0;
  color: var(--muted);
}

.article-body > * {
  max-width: 680px;
}

.article-content p,
.article-content li {
  font-family: var(--prose-font);
  font-size: 19px;
  line-height: 1.65;
  letter-spacing: -0.003em;
}

.article-content p + p {
  margin-top: 16px;
}

.article-content h2 {
  margin-top: 44px;
}

.article-content h3 {
  margin-top: 32px;
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
}

.article-source {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 32px 0;
}

/* Let dense diagrams use a wider visual column while prose stays readable. */
.article-content .article-diagram {
  width: 960px;
  margin: 40px 0 40px -140px;
}

.article-content .diagram-link {
  display: block;
}

.article-content .diagram-link img {
  width: 100%;
  max-width: none;
  margin: 0;
}

.article-content .diagram-full-size {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 13px;
  letter-spacing: normal;
}

.article-content .article-diagram {
  text-align: right;
}

.article-body blockquote {
  margin: 28px 0;
  padding-left: 20px;
  border-left: 2px solid var(--line);
  font-family: var(--prose-font);
  font-size: 20px;
  line-height: 1.55;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 24px;
  border-radius: 0;
}

h1 {
  font-family: var(--ui-font);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 16px;
  letter-spacing: -0.035em;
}

h2 {
  font-family: var(--ui-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
}

h3 {
  font-family: var(--ui-font);
  font-size: 18px;
  line-height: 1.3;
  margin: 32px 0 12px;
  letter-spacing: -0.012em;
}

p {
  margin: 10px 0;
}

header p:not(.small),
section p:not(.small),
section .list:not(.small),
section .prose-list {
  font-family: var(--prose-font);
  font-size: 19px;
  line-height: 1.65;
  letter-spacing: -0.003em;
  max-width: 680px;
}

header p:not(.small) a,
section p:not(.small) a,
section .list:not(.small) a,
section .prose-list a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

section h2:not(:first-of-type) {
  margin-top: 44px;
}

@media (max-width: 600px) {
  .wrap {
    padding-top: 36px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 22px;
  }

  #latest-writing {
    font-size: 24px;
  }

  header p:not(.small),
  section p:not(.small),
  section .list:not(.small),
  section .prose-list,
  .article-content p,
  .article-content li {
    font-size: 18px;
  }
}

@media (max-width: 1100px) {
  .article-content .article-diagram {
    width: 100%;
    margin: 32px 0;
  }
}

.site-nav {
  margin-top: 18px;
  margin-bottom: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-nav a,
.section-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.section-nav a:hover {
  border-bottom-color: var(--muted);
}

.site-name {
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}

.section-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 13px;
}

.small,
.meta,
footer {
  color: var(--muted);
}

.small,
.meta,
footer,
.links {
  font-size: 13px;
}

.tagline {
  margin: 0;
}

section + section {
  margin-top: 88px;
}

.milestone-list {
  max-width: 680px;
  border-top: 1px solid var(--line);
}

.milestone {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.milestone h3 {
  margin: 8px 0;
  font-size: 22px;
}

.milestone p {
  margin: 0;
}

.milestone-link {
  display: inline-block;
  margin-top: 12px;
  color: inherit;
  font-size: 13px;
  text-underline-offset: 2px;
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li {
  margin: 6px 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.card {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.career-timeline .card p {
  margin: 8px 0 0;
  max-width: 680px;
}

.talk-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.meta {
  margin-top: 2px;
}

.links {
  margin-top: 6px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.links a,
.table-wrap td a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.kicker {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

footer {
  margin-top: 96px;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.article-content code {
  font-size: 0.78em;
}

pre {
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 12px;
  overflow: auto;
  margin: 12px 0 0;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 24px;
}

.table-wrap table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--ui-font);
}

.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  padding-left: 0;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  padding-right: 0;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.table-wrap th {
  color: var(--fg);
  border-bottom-color: var(--fg);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.video-list {
  display: grid;
  gap: 28px;
  max-width: 680px;
}

.video-embed {
  aspect-ratio: 16 / 9;
  background: var(--line);
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.chronological-talks td:nth-child(2) {
  font-weight: 600;
}

.chronological-talks th:nth-child(2),
.chronological-talks td:nth-child(2) {
  width: 30%;
}

.chronological-talks th:nth-child(5),
.chronological-talks td:nth-child(5) {
  width: 11%;
}

.chronological-talks th:nth-child(6),
.chronological-talks td:nth-child(6) {
  width: 16%;
}
