/* Minimal, “karpathy-ish” readability */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #555555;
  --link: #111111;
  --rule: #e9e9e9;
  --maxw: 1000px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 19px/1.65 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 18px 64px;
}

.header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.hero {
  display: flex;
  gap: 18px;
  align-items: center;
}

.avatar {
  width: 300px;
  height: 300px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--rule);
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 10px;
  color: var(--muted);
}

.hero-quote {
  margin: 18px 0 14px;
  max-width: 620px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid #d8d8d8;
  color: var(--muted);
}

.hero-quote blockquote {
  margin: 0;
  color: #333333;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 450;
}

.hero-quote blockquote::before {
  content: "\201C";
}

.hero-quote blockquote::after {
  content: "\201D";
}

.hero-quote figcaption {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.hero-quote cite {
  font-style: normal;
}

.hero-quote a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #cfcfcf;
}

.hero-quote a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.hero-quote figcaption::before {
  content: "\2014  ";
}

@media (max-width: 760px) {
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .avatar {
    width: min(70vw, 260px);
    height: min(70vw, 260px);
  }

  .hero-quote {
    max-width: 100%;
  }
}

.links {
  margin: 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.social-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sep { margin: 0 8px; color: var(--muted); }

.nav {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: var(--link);
}

.section {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.section:last-of-type {
  border-bottom: none;
}

h2 {
  font-size: 18px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

p { margin: 10px 0; }

ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

li { margin: 6px 0; }

.item {
  padding: 12px 0;
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.item-title {
  font-weight: 600;
}

.item-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.item-date {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.item-blurb {
  margin-top: 6px;
  color: var(--muted);
}

.muted { color: var(--muted); }
.note, .footnote { color: var(--muted); font-size: 14px; }

.footer {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

a {
  color: #1a73e8;
  text-decoration: underline;
}

a:hover {
  color: #0b57d0;
}

/* Timeline (karpathy-ish) */
.timeline-disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.timeline-disclosure > summary::-webkit-details-marker,
.t-detail > summary::-webkit-details-marker {
  display: none;
}

.timeline-disclosure > summary::before,
.t-detail > summary::before {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  width: 14px;
  flex: none;
}

.timeline-disclosure[open] > summary::before,
.t-detail[open] > summary::before {
  content: "-";
}

.timeline-disclosure h2 {
  margin: 0;
}

.timeline {
  position: relative;
  margin-top: 14px;
  padding-left: 0px;
}

.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px 28px 1fr;
  gap: 20px;
  padding: 18px 0 26px 0;
}

.t-year {
  color: #9a9a9a;
  font-size: 15px;
  text-align: right;
  padding-top: 18px;
  white-space: nowrap;
}

.t-dot {
  position: relative;
  width: 20px;
}

.t-dot::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d6d6d6;
}

.t-dot::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #888;
}

.t-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.t-body {
  min-width: 0;
  width: 100%;
}

.t-logo img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--bg);
  object-fit: contain;
  padding: 8px;
}

.t-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.t-role {
  font-weight: 400;
  color: var(--muted);
}

.t-desc {
  margin-top: 8px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 19px;
}

@media (max-width: 520px) {
  .t-item {
    grid-template-columns: 60px 18px 1fr;
  }
  .t-logo img {
    width: 40px;
    height: 40px;
  }
}

.course-header {
  font-weight: 500;
  color: #222;
  font-size: 1.05em;
  margin-right: 0.3em;
}

.note-article {
  max-width: 780px;
}

.note-article h2 {
  margin-top: 28px;
}

.note-article h2:first-child {
  margin-top: 0;
}

.note-article p {
  margin: 14px 0;
}

.math-block {
  margin: 18px 0;
  padding: 12px 16px;
  overflow-x: auto;
  border-left: 3px solid #d8d8d8;
  background: #fafafa;
}

.note-list {
  margin-top: 12px;
  margin-left: 24px;
}

.note-list li {
  margin: 12px 0;
  padding-left: 4px;
}
