:root {
  --ink: #1a1a1a;
  --muted: #666666;
  --soft: #8a8a8a;
  --rule: #ececec;
  --accent: #1f4fd1;
  --serif: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration-color: #b0b0b0; text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.page { max-width: 680px; margin: 0 auto; padding: 112px 24px 96px; }

.meta, .label, .timeline-years, .chapter-when, .links {
  font-family: var(--mono);
  color: var(--muted);
}

.meta { margin: 0 0 56px; font-size: 14px; }

h1 {
  margin: 0 0 28px;
  font-size: clamp(40px, 7vw, 60px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.02em;
}
h1 .then { color: var(--soft); }
h1 .now { font-style: italic; color: var(--accent); }

p { margin: 0 0 24px; }
.intro { margin-bottom: 72px; }

.timeline { display: flex; gap: 3px; height: 4px; margin-bottom: 8px; }
.timeline span:nth-child(1) { flex: 5 1 0; background: #e2e2e2; }
.timeline span:nth-child(2) { flex: 4 1 0; background: #cfcfcf; }
.timeline span:nth-child(3) { flex: 3 1 0; background: #b5b5b5; }
.timeline span:nth-child(4) { flex: 5 1 0; background: var(--soft); }
.timeline span:nth-child(5) { flex: 1.8 1 0; background: var(--accent); }

.timeline-years { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 48px; }

.chapters { list-style: none; margin: 0 0 72px; padding: 0; }
.chapter { padding: 28px 0; border-top: 1px solid var(--rule); }
.chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 8px;
}
.chapter h2 { margin: 0; font-size: 30px; font-weight: 400; font-style: italic; }
.chapter.current h2 { color: var(--accent); }
.chapter-when { font-size: 13px; }
.chapter p { margin: 0; }

.label {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section { margin-bottom: 72px; }

.links { margin: 0; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 14px; }

@media (max-width: 480px) {
  body { font-size: 18px; }
  .page { padding: 64px 16px 64px; }
  .meta { margin-bottom: 40px; }
  .chapter h2 { font-size: 26px; }
}

/* Subpages: resume and projects */
.meta a { color: var(--muted); text-decoration: none; }
.meta a:hover { color: var(--accent); }

.when { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.company { padding: 32px 0 8px; border-top: 1px solid var(--rule); }
.company + .section { margin-top: 40px; }
.company-head, .role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.company-head { margin-bottom: 16px; }
.company h2 { margin: 0; font-size: 30px; font-weight: 400; font-style: italic; }
.role { margin-bottom: 24px; }
.role h3 { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.4; }
.role ul { margin: 8px 0 0; padding-left: 20px; }
.role li { margin-bottom: 8px; }
.role li::marker { color: var(--soft); }

.projects { list-style: none; margin: 0 0 72px; padding: 0; }
.project {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.project img {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border: 1px solid var(--rule);
  flex: 0 0 auto;
}
.project h2 { margin: 0 0 8px; font-size: 26px; font-weight: 400; font-style: italic; }
.project h2 a { text-decoration: none; }
.project p { margin: 0; }

@media (max-width: 480px) {
  .project { flex-direction: column; gap: 16px; }
  .project img { width: 88px; height: 88px; }
  .company h2 { font-size: 26px; }
}
