@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/newsreader-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/newsreader-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #fcfcfb;
  --text: #111;
  --muted: rgba(0, 0, 0, 0.45);
  --soft: rgba(0, 0, 0, 0.65);
  --line: rgba(0, 0, 0, 0.08);
  --underline: rgba(0, 0, 0, 0.25);
  --accent: #e5197e;
  --col: 36.375rem;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --quote: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  letter-spacing: -0.0056rem;
  font-feature-settings: "cv11", "ss01";
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: currentColor; }

.page {
  max-width: var(--col);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 4rem;
}

/* Site header: E plus the two section links, left aligned */
.site-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 2.75rem;
}
.site-header a { text-decoration: none; }
.site-header .brand { font-weight: 700; font-size: 1.125rem; margin-right: auto; }
.site-header .nav-link { color: var(--muted); }
.site-header .nav-link:hover, .site-header .nav-link.current { color: var(--text); }
.meta { color: var(--muted); }

/* Home intro: name and three lines */
.intro { margin: 0.75rem 0 2.5rem; }
.intro h1 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02rem;
  margin: 0 0 0.75rem;
}
.intro ul { list-style: none; margin: 0; padding: 0; }
.intro li { padding: 0.2rem 0; color: var(--soft); }
.intro p { margin: 1rem 0 0; }

/* Page title block */
.masthead { margin: 0.75rem 0 2.25rem; }
.masthead h1 {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035rem;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

/* Left column on article pages: back link and table of contents, stays on screen */
.rail {
  position: fixed;
  top: 5.5rem;
  left: 5rem;
  bottom: 2rem;
  width: 14rem;
  overflow-y: auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 0.875rem; }
.back:hover { color: var(--text); }
.toc { margin-top: 2.75rem; font-size: 0.8125rem; line-height: 1.4; }
.toc-label { color: var(--text); font-weight: 550; margin-bottom: 0.75rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 0.5rem; }
.toc .toc-h2 { margin-top: 0.9rem; }
.toc .toc-h2:first-child { margin-top: 0; }
.toc .toc-h3 { padding-left: 0.75rem; }
.toc .toc-h2 a { color: var(--soft); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--text); }
@media (max-width: 1180px) {
  .rail { display: none; }
}

/* Body copy */
.prose strong { font-weight: 550; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure { margin: 0 0 1.1rem; }
.prose h2, .prose h3, .prose h4 {
  font-weight: 600;
  line-height: 1.3;
  scroll-margin-top: 2rem;
  text-wrap: balance;
}
.prose h2 {
  font-size: 1.375rem;
  letter-spacing: -0.02rem;
  margin: 3rem 0 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.prose h3 { font-size: 1.0625rem; margin: 2.25rem 0 0.75rem; }
.prose h4 { font-size: 0.9375rem; color: var(--soft); margin: 1.75rem 0 0.6rem; }
.prose h2 strong, .prose h3 strong, .prose h4 strong { font-weight: inherit; }
.prose > h2:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.15rem; }
.prose li { margin-bottom: 0.35rem; }
.prose li::marker { color: var(--muted); }
.prose blockquote {
  margin: 1.75rem 0;
  padding: 0 0 0 1rem;
  border-left: 1px solid var(--underline);
  font-family: var(--quote);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--soft);
}
.prose blockquote em { font-style: italic; }
.prose img, .prose iframe { max-width: 100%; height: auto; display: block; border-radius: 6px; }
.prose iframe { width: 100%; height: 450px; border: 1px solid var(--line); }
.prose figure { margin: 1.75rem 0; }
.prose figure > div { margin: 0; }
.prose figcaption, .caption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.prose code {
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-bottom: 1.25rem; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.5rem 0.5rem 0; border-bottom: 1px solid var(--line); }
.hero { margin: 0 0 2.25rem; }
.hero img { width: 100%; height: auto; display: block; border-radius: 6px; }

/* Section labels and the year-grouped lists */
.section { margin-top: 3.5rem; }
.label { color: var(--muted); margin: 0 0 0.6rem; font-size: inherit; font-weight: inherit; }
.list { border-top: 1px solid var(--line); }
.group { display: grid; grid-template-columns: 6.75rem 1fr; border-bottom: 1px solid var(--line); }
.group .year { color: var(--muted); padding: 0.6rem 0; }
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.6rem 0;
  text-decoration: none;
}
.rows .row + .row { border-top: 1px solid var(--line); }
.row .title { min-width: 0; }
.row .date { color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.row:hover .title { text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 0.2em; }
.list.flat .row { border-bottom: 1px solid var(--line); }
.new {
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  line-height: 1.3rem;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
}
@media (max-width: 520px) {
  .group { grid-template-columns: 3.5rem 1fr; }
}

/* Essay rows: thumbnail, title, description, date */
.posts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.post-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  align-items: start;
}
.post-row .thumb {
  aspect-ratio: 3 / 2;
  border-radius: 5px;
  overflow: hidden;
  background: #efeee9;
}
.post-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1); transition: filter 0.25s ease; }
.post-row:hover .thumb img { filter: none; }
.post-row .t { font-weight: 550; line-height: 1.35; margin-bottom: 0.3rem; text-wrap: balance; }
.post-row:hover .t { text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 0.2em; }
.post-row .d {
  color: var(--soft);
  font-size: 0.875rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-row .when { color: var(--muted); font-size: 0.8125rem; margin-top: 0.45rem; }
@media (max-width: 520px) { .post-row { grid-template-columns: 5rem 1fr; gap: 1rem; } }

/* Reading list as a grid of covers */
.covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.25rem, 1fr));
  gap: 2rem 1.25rem;
}
.cover { text-decoration: none; display: block; }
.cover .art {
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: #efeee9;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 6px 18px rgba(0,0,0,.07);
  transition: transform 0.2s ease;
}
.cover:hover .art { transform: translateY(-3px); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .t {
  margin-top: 0.7rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cover .r { color: var(--muted); font-size: 0.8125rem; margin-top: 0.2rem; }

/* Book notes */
.book-head { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2.25rem; }
.book-head img { width: 6.5rem; height: auto; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06); }
.book-head .summary { margin: 0 0 0.75rem; }

/* Footer */
.footer {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer a { color: inherit; }
.footer .links a + a { margin-left: 0.9rem; }

/* Webflow embed wrappers (LinkedIn posts, tweets) */
.prose .w-embed { margin: 1.75rem 0; }
