:root {
  --bg: #f8f4ec;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-strong: #fffdf8;
  --text: #1f1a17;
  --muted: #655d57;
  --line: rgba(31, 26, 23, 0.14);
  --accent: #7d2f21;
  --accent-soft: rgba(125, 47, 33, 0.08);
  --shadow: 0 18px 40px rgba(60, 35, 19, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(174, 96, 69, 0.12), transparent 30%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 48%, #f4efe7 100%);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: rgba(125, 47, 33, 0.4);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
.brand,
.nav-links,
.eyebrow {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-shell {
  padding: 18px 0 0;
}

.nav {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.brand,
.nav-links a {
  color: rgba(31, 26, 23, 0.78);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand {
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--accent);
}

.page-shell {
  padding: 52px 0 100px;
}

.content {
  margin-bottom: 120px;
}

.section,
.page-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.35fr) 280px;
  margin-top: 28px;
  padding: 10px 42px 0;
}

.hero-image {
  align-self: start;
}

.hero-image img {
  border-radius: 24px;
  box-shadow: 0 20px 32px rgba(38, 20, 13, 0.14);
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero h1,
.page-header h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.55rem, 3.1vw, 2.35rem);
}

.lead {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 22px;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 24px;
}

.inline-links a,
.section-link a,
.timeline-links a {
  color: var(--accent);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  text-decoration: none;
}

.section {
  margin-top: 28px;
  padding: 34px 42px;
}

.section h2,
.year-block h2 {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.section-split {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-footnote {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-top: 34px;
}

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

.publication-list,
.news-list,
.timeline,
.contact-grid,
.blog-preview-list {
  display: grid;
  gap: 14px;
}

.publication-card,
.news-card,
.timeline-row,
.contact-card,
.blog-preview-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
}

.publication-card h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.pub-year,
.news-date,
.timeline-date,
.contact-label,
.pub-meta,
.pub-note {
  color: var(--muted);
}

.pub-year,
.news-date,
.timeline-date,
.contact-label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pub-meta,
.pub-note,
.timeline-copy p:last-child,
.news-card p:last-child {
  margin-bottom: 0;
}

.page-header {
  margin-top: 28px;
  padding: 38px 42px 28px;
}

.front-matter {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 28px;
  padding: 26px 0;
}

.front-matter .article-head {
  max-width: 760px;
}

.front-matter h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.04;
  margin-bottom: 10px;
}

.front-matter h4 {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 18px;
  max-width: 720px;
}

.bylines .byline {
  float: left;
  margin-right: 22px;
}

.bylines .byline h3,
.bylines .byline p {
  margin: 0;
}

.bylines .byline h3 {
  color: var(--muted);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bylines .byline p {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.84rem;
  margin-top: 4px;
}

.clear {
  clear: both;
}

.article-shell {
  position: relative;
}

.article {
  color: rgba(31, 26, 23, 0.88);
  font-size: 1rem;
  line-height: 1.72;
  margin-top: 46px;
  max-width: 760px;
}

.post-toc {
  display: none;
}

.post-toc-label {
  color: var(--muted);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.post-toc-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-toc-nav li + li {
  margin-top: 0.45rem;
}

.post-toc-nav a {
  color: var(--muted);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.86rem;
  line-height: 1.35;
  text-decoration: none;
}

.post-toc-nav a:hover {
  color: var(--accent);
}

.post-toc-nav .toc-subitem {
  padding-left: 0.85rem;
}

.article h2 {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin-top: 2.4rem;
  margin-bottom: 0.85rem;
}

.article p,
.article ul,
.article ol,
.article pre {
  margin-bottom: 1.1rem;
}

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

.article pre {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
  padding: 16px 18px;
}

.article code {
  font-size: 0.93em;
}

.article pre code {
  background: transparent;
  padding: 0;
}

.article blockquote {
  border-left: 3px solid rgba(31, 26, 23, 0.18);
  color: var(--muted);
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
}

.article .equation-label {
  color: var(--muted);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  margin-top: -0.4rem;
  text-align: right;
}

.article .citation-marker {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.72em;
  margin-left: 0.12rem;
  vertical-align: super;
}

.article .citation-marker a,
.article .citation-inline a,
.article .reference-backlink {
  text-decoration: none;
}

.article .citation-inline {
  font-family: inherit;
  font-size: 1em;
}

.article .reference-backlink {
  margin-left: 0.45rem;
  white-space: nowrap;
}

.article .bibliography {
  padding-left: 1.2rem;
}

.article .bibliography li {
  margin-bottom: 0.8rem;
}

.article .reference-authors {
  color: var(--muted);
}

.article .reference-venue {
  color: var(--muted);
}

.article .post-caption {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.45;
  margin-top: -0.35rem;
}

.prose h2 {
  margin-top: 30px;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card {
  color: inherit;
  text-decoration: none;
}

.contact-value {
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  margin-top: 8px;
}

.timeline-row {
  display: grid;
  gap: 20px;
  grid-template-columns: 120px minmax(0, 1fr);
}

.timeline-links {
  margin-top: 8px;
}

.year-block + .year-block {
  margin-top: 34px;
}

#blog-index {
  margin-top: 64px;
  margin-bottom: 100px;
  max-width: 760px;
}

#blog-index #intro {
  margin-bottom: 38px;
}

#blog-index .quote {
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 20px;
}

#blog-index .quote p {
  margin-bottom: 6px;
}

#blog-index .quote a,
.blog-intro {
  color: var(--muted);
}

#blog-index .section-plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

#blog-index .section-plain h2 {
  color: rgba(31, 26, 23, 0.42);
}

#blog-index .post-row {
  align-items: baseline;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 170px;
}

#blog-index .post-title,
#blog-index .post-date,
#blog-index .post-subtitle {
  margin-bottom: 0;
}

#blog-index .post-title a {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  text-decoration: none;
}

#blog-index .post-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

#blog-index .post-date {
  color: var(--muted);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

#blog-index .post-subtitle {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.55;
  margin-top: 4px;
  margin-bottom: 26px;
  max-width: 640px;
}

@media screen and (max-width: 860px) {
  .hero,
  .section-split,
  .timeline-row,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px;
  }

  .section,
  .page-header {
    padding: 28px;
  }

  .hero-image {
    display: none;
  }

  #blog-index .post-row {
    grid-template-columns: 1fr;
  }

  #blog-index .post-date {
    text-align: left;
  }
}

@media screen and (min-width: 1180px) {
  .article-shell {
    max-width: 760px;
  }

  .article-shell .article {
    margin-left: 0;
    margin-right: 0;
  }

  .post-toc {
    display: block;
    left: -205px;
    position: absolute;
    top: 46px;
    width: 170px;
  }

  .post-toc .post-toc-nav {
    position: sticky;
    top: 110px;
  }
}

@media screen and (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }

  .hero {
    padding: 18px 16px 0;
  }

  .section,
  .page-header {
    padding: 22px 24px;
  }

  .nav {
    gap: 14px;
  }

  .page-shell {
    padding-top: 18px;
    padding-bottom: 56px;
  }

  .nav-shell {
    padding-top: 10px;
  }

  .front-matter {
    margin-top: 18px;
    padding: 18px 0;
  }

  .front-matter .article-head {
    padding: 0 16px;
  }

  .front-matter h1 {
    font-size: clamp(1.5rem, 8vw, 2.15rem);
    line-height: 1.02;
    margin-bottom: 12px;
  }

  .front-matter h4 {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 14px;
  }

  .bylines .byline h3 {
    font-size: 0.64rem;
  }

  .bylines .byline p {
    font-size: 0.82rem;
  }

  .article {
    font-size: 0.97rem;
    line-height: 1.62;
    margin-top: 30px;
  }

  .article h2 {
    font-size: 1.18rem;
    margin-top: 2rem;
    margin-bottom: 0.7rem;
  }

  .article p,
  .article ul,
  .article ol,
  .article pre {
    margin-bottom: 0.95rem;
  }

  .article pre {
    border-radius: 12px;
    font-size: 0.9rem;
    padding: 12px 14px;
  }

  .article .post-caption {
    font-size: 0.86rem;
    line-height: 1.4;
  }
}
