:root {
  --ink: #171717;
  --muted: #656565;
  --line: #d8cec1;
  --link: #2456a6;
  --page: #f1e9df;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }

.site-header, main, footer { width: min(100% - 40px, 900px); margin-inline: auto; }
.site-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.site-name { font-weight: 600; letter-spacing: -.02em; }
nav { display: flex; gap: 25px; font-size: 14px; color: var(--muted); }
nav a:hover, footer a:hover { color: var(--link); }
nav a[aria-current="page"] { color: var(--ink); }

main > section { padding: 76px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 25px; }
.intro { display: grid; grid-template-columns: 168px 1fr; grid-template-areas: "photo clock" "photo copy"; column-gap: 52px; row-gap: 0; align-items: start; padding-top: 90px; }
.intro img { grid-area: photo; display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 38%; border-radius: 50%; }
.intro-copy { grid-area: copy; }
.world-clock { grid-area: clock; display: grid; grid-template-columns: repeat(3, max-content); gap: 30px; margin: 0 0 20px; padding-block: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 5px, rgba(23, 23, 23, .025) 6px); }
.clock-city { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.clock-name { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.clock-city time { color: var(--muted); font: 500 15px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: .01em; white-space: nowrap; }
.clock-current .clock-name, .clock-current time { color: #8f4f22; }
h1 { margin: 0 0 17px; font-size: clamp(38px, 6vw, 58px); line-height: 1.08; letter-spacing: -.05em; font-weight: 600; }
.lead { margin: 0 0 18px; color: var(--ink); font-size: 21px; line-height: 1.45; }
.intro p:not(.location):not(.lead) { margin: 0; color: var(--muted); }
.intro-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 27px; font-size: 14px; }
.intro-links a { color: var(--link); }
.intro-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

main > section:not(.intro) { display: grid; grid-template-columns: 190px 1fr; gap: 44px; }
h2 { margin: 1px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
#notes-title a:hover { color: var(--link); }
.body-copy { max-width: 635px; }
.body-copy p { margin: 0 0 22px; }
.body-copy p:last-child { margin-bottom: 0; }

.entries { border-top: 1px solid var(--line); }
.entries article { padding: 25px 0 27px; border-bottom: 1px solid var(--line); }
.entries article:last-child { border-bottom: 0; padding-bottom: 0; }
.entries h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.entries h3 a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.entries h3 span { color: var(--muted); font-weight: 400; }
.entries p { margin: 0; color: var(--muted); }
.entries.compact article { padding-block: 19px; }
.compact h3 { margin-bottom: 2px; }
.education-list { grid-column: 1 / -1; }
.education-list article { display: grid; grid-template-columns: 190px 1fr; gap: 44px; align-items: center; }
.school-logo { display: block; width: 100%; max-width: 190px; height: auto; object-fit: contain; object-position: left center; }

footer { min-height: 100px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
footer div { display: flex; gap: 20px; }

.article-header, .article-body { width: min(100% - 40px, 720px); margin-inline: auto; }
.article-header { padding: 78px 0 42px; }
.article-header .back-link { display: inline-block; margin-bottom: 42px; color: var(--link); font-size: 14px; }
.article-header .back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-header h1 { max-width: 700px; font-size: clamp(38px, 7vw, 62px); }
.article-meta { margin: 0; color: var(--muted); font-size: 14px; }
.article-hero { display: block; width: 100%; height: auto; margin: 0 0 52px; border-radius: 3px; }
.article-body { min-width: 0; padding-bottom: 84px; font-size: 18px; line-height: 1.75; overflow-wrap: break-word; }
.article-body p { margin: 0 0 26px; }
.article-body h2 { margin: 52px 0 18px; font-size: 25px; line-height: 1.3; }
.article-body h3 { margin: 32px 0 10px; font-size: 19px; }
.article-body h4 { margin: 28px 0 10px; font-size: 17px; }
.article-body ul { margin: 0 0 28px; padding-left: 24px; }
.article-body ol { margin: 0 0 28px; padding-left: 24px; }
.article-body li { margin-bottom: 12px; }
.article-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.article-figure { width: 100%; max-width: 100%; margin: 42px 0; }
.article-figure img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: auto; margin-inline: auto; object-fit: contain; border-radius: 3px; }
.article-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.article-body blockquote { margin: 32px 0; padding-left: 22px; border-left: 3px solid var(--line); color: var(--muted); }
.article-code { max-width: 100%; margin: 28px 0; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 3px; background: #f7f7f5; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre; }
.article-video { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; margin: 38px 0; }
.article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
main > .writings-page { display: block; max-width: 720px; margin-inline: auto; padding-top: 90px; }
.writings-page h1 { margin-bottom: 40px; }

@media (max-width: 700px) {
  .site-header, main, footer { width: min(100% - 32px, 900px); }
  .site-header { min-height: 64px; }
  .site-header .site-name { display: none; }
  nav { width: 100%; display: flex; justify-content: center; gap: clamp(12px, 5vw, 24px); padding-block: 8px; font-size: 13px; white-space: nowrap; }
  nav a { min-height: 24px; }
  main > section { padding: 58px 0; }
  .intro { grid-template-columns: 120px 1fr; column-gap: 26px; padding-top: 52px; }
  .world-clock { margin-bottom: 10px; }
  h1 { font-size: 38px; }
  .lead { font-size: 18px; }
  .intro-links { gap: 14px; }
  main > section:not(.intro) { grid-template-columns: 1fr; gap: 26px; }
  .education-list { grid-column: auto; }
  .education-list article { grid-template-columns: 120px 1fr; gap: 26px; }
  .school-logo { max-width: 120px; }
}

@media (max-width: 480px) {
  .site-header, main, footer { width: min(100% - 28px, 900px); }
  .intro { grid-template-columns: 1fr; grid-template-areas: "clock" "photo" "copy"; gap: 30px; padding-top: 30px; }
  .intro img { width: min(31vw, 118px); max-width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .site-name { font-size: 14px; }
  .world-clock { width: 100%; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 0; padding-block: 14px; }
  .clock-name { font-size: 10px; letter-spacing: .14em; }
  .clock-city time { font-size: clamp(13px, 4vw, 17px); letter-spacing: .01em; }
  h1 { font-size: clamp(36px, 11vw, 46px); }
  .intro-links a { display: inline-flex; min-height: 44px; align-items: center; }
  .education-list article { grid-template-columns: 82px 1fr; gap: 18px; }
  .school-logo { width: 100%; max-width: 82px; height: auto; }
  footer { padding-bottom: env(safe-area-inset-bottom); }
  .article-header, .article-body { width: min(100% - 28px, 720px); }
  .article-header { padding-top: 46px; }
  .article-header h1 { font-size: clamp(32px, 10vw, 42px); overflow-wrap: anywhere; }
  .article-header .back-link { margin-bottom: 30px; }
  .article-hero { margin-bottom: 36px; }
  .article-body { max-width: 100%; font-size: 17px; }
  .article-body ul, .article-body ol { padding-left: 21px; }
  .article-code { width: 100%; padding: 15px 16px; font-size: 12px; }
  .article-figure { margin-block: 30px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
