:root {
  --ink: #151817;
  --muted: #69706d;
  --paper: #fbfaf7;
  --surface: #fff;
  --line: #dcded9;
  --accent: #215e4b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration-color: #92b6aa;
  text-underline-offset: 3px;
}

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

.shell {
  width: min(1160px, calc(100% - 56px));
  min-height: 100vh;
  margin: auto;
  display: flex;
  flex-direction: column;
}

header {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
  font-size: .9rem;
}

nav a {
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.12;
  letter-spacing: -.02em;
}

h1 {
  margin: 0;
  font-size: clamp(3.8rem, 8vw, 7.5rem);
  font-weight: 400;
}

h2 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 400;
}

h3 {
  margin: 0;
  font-size: 1.22rem;
}

.intro {
  margin: .65rem 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.section {
  padding: 80px 0;
}

.section-title {
  margin-bottom: 34px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}

.section-title p {
  margin: 0 0 .25rem;
  color: var(--muted);
}

.section-title h1 {
  font-size: clamp(2.5rem, 5vw, 4.3rem);
}

.stories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: 24px;
  align-items: stretch;
}

.story {
  min-width: 0;
  height: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 72%, var(--paper));
  color: inherit;
  text-decoration: none;
  overflow-wrap: break-word;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.story:hover,
.story:focus-within {
  border-color: #b4c8c1;
  box-shadow: 0 12px 30px rgba(21, 24, 23, .08);
  transform: translateY(-2px);
}

.story:hover h3 {
  color: var(--accent);
}

.story h3 a {
  text-decoration: none;
}

.story-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  background: #e5e6e1;
  object-fit: cover;
  transition: transform .25s ease;
}

.story>a[tabindex="-1"] {
  margin: -18px -18px 16px;
  display: block;
  overflow: hidden;
  background: #e5e6e1;
}

.story:hover .story-image {
  transform: scale(1.025);
}

.story:not(:has(.story-image)) {
  border-top: 3px solid var(--accent);
  padding-top: 16px;
}

.publication {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: pre-line;
}

.story h3 {
  margin: .35rem 0 0;
  transition: color .15s ease;
}

.story p {
  margin: .5rem 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: .9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.story time {
  margin-top: auto;
  padding-top: .75rem;
  color: var(--muted);
  font-size: .78rem;
}

.story-links {
  margin-top: .65rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  font-size: .82rem;
}

.prose {
  max-width: 850px;
  overflow-wrap: break-word;
}

.home-intro {
  width: min(100%, 800px);
  margin-inline: auto;
  padding-block: clamp(72px, 11vw, 140px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: clamp(32px, 6vw, 64px);
}

.portrait {
  display: block;
  height: auto;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 2px;
  object-fit: cover;
}

.home-portrait {
  width: 100%;
  justify-self: end;
}

.home-name {
  margin: 0 0 .6rem;
  font: 400 clamp(1.5rem, 3vw, 2rem)/1.2 Georgia, "Times New Roman", serif;
}

.home-intro .intro {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.prose h1 {
  margin: 0 0 2.5rem;
  font-size: clamp(2.5rem, 5vw, 4.3rem);
}

.prose h2 {
  margin: 2.4em 0 .8em;
  font-size: 1.8rem;
}

.prose h3 {
  margin: 1.8em 0 .35em;
  font-size: 1.18rem;
}

.prose p {
  margin: 0 0 1.2em;
}

.prose li {
  margin: .5em 0;
  padding-left: .25em;
}

.prose ol,
.prose ul {
  padding-left: 1.3rem;
}

.research ol {
  font-size: 1.05rem;
}

.about {
  max-width: 800px;
}

.about-portrait {
  width: min(32%, 220px);
  margin: 0 0 1.5rem 2rem;
  float: right;
}

.about h2 {
  clear: both;
}

.fun {
  max-width: none;
}

.fun .embed {
  width: 100%;
  aspect-ratio: 16/9;
  margin: .5rem 0 1rem;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 8px 30px rgba(21, 24, 23, .1);
}

.fun p,
.fun ul {
  max-width: 800px;
}

.cv {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
}

.cv h1 {
  margin-bottom: .15rem;
}

.cv-heading {
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.cv-heading>div {
  min-width: 0;
}

.cv-heading p {
  margin: .25rem 0 0;
  color: var(--muted);
}

.cv h2 {
  margin-top: 2.5em;
  padding-bottom: .35em;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 1.65rem;
}

.cv h3 {
  margin-top: 1.6em;
  font-size: 1.15rem;
}

.cv h3+p {
  color: var(--muted);
}

.cv ul,
.cv ol {
  margin-top: .55rem;
}

.cv-entry+.cv-entry {
  margin-top: 1.75rem;
}

.print {
  flex: none;
  margin-top: 4px;
  padding: .65rem .9rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.print:hover {
  background: var(--ink);
  color: var(--paper);
}

footer {
  margin-top: auto;
  padding: 38px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}

@media (max-width:780px) {
  .shell {
    width: min(100% - 38px, 1160px);
  }

  header {
    padding: 16px 0;
    align-items: flex-start;
  }

  nav {
    max-width: 250px;
  }

  .section {
    padding: 60px 0;
  }

  .home-intro {
    padding-block: 64px 80px;
  }

  .section-title {
    display: block;
  }

  .section-title p {
    margin-top: .5rem;
  }

  .stories {
    gap: 18px;
  }

  .cv-heading {
    display: block;
    margin-bottom: 2.25rem;
  }

  .print {
    margin: 1.25rem 0 0;
  }
}

@media (max-width:680px) {
  .home-intro {
    width: min(100%, 420px);
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-portrait {
    width: min(100%, 240px);
    justify-self: start;
  }

  .about-portrait {
    width: min(100%, 240px);
    margin: 0 0 2rem;
    float: none;
  }
}

@media (max-width:520px) {
  header {
    display: block;
  }

  .brand {
    display: inline-block;
    margin-bottom: .7rem;
  }

  nav {
    max-width: none;
    justify-content: flex-start;
    gap: .35rem 1rem;
  }

  nav a {
    padding-block: .2rem;
  }
}

@page {
  size: A4;
  margin: 14mm 18mm 16mm;
}

@media print {
  :root {
    --ink: #000;
    --muted: #222;
    --paper: #fff;
    --line: #aaa;
  }

  html,
  body {
    background: #fff;
  }

  body {
    color: #000;
    font: 9pt/1.3 "Helvetica Neue", Arial, sans-serif;
    print-color-adjust: exact;
  }

  .shell {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    display: block;
  }

  header,
  footer,
  .print {
    display: none !important;
  }

  .section.cv {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    max-width: none;
  }

  .cv h1 {
    margin: 0 0 2pt;
    color: #000;
    font: 700 20pt/1.05 Georgia, "Times New Roman", serif;
    letter-spacing: 0;
    text-align: center;
  }

  .cv-heading {
    margin: 0;
    display: block;
  }

  .cv-heading p {
    margin: 0 0 8pt;
    padding-bottom: 6pt;
    border-bottom: 1pt solid #000;
    color: #000;
    text-align: center;
  }

  .cv h2 {
    margin: 10pt 0 4pt;
    padding: 0 0 2pt;
    border-bottom: .7pt solid #777;
    color: #000;
    font: 700 10.5pt/1.15 "Helvetica Neue", Arial, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .cv h3 {
    margin: 5pt 0 1pt;
    color: #000;
    font: 700 9.25pt/1.2 "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .cv p {
    margin: 0 0 4pt;
  }

  .cv h3+p {
    color: #000;
  }

  .cv ul,
  .cv ol {
    margin: 2pt 0 5pt;
    padding-left: 15pt;
  }

  .cv li {
    margin: 0 0 1.5pt;
    padding-left: 0;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .cv-entry,
  .cv-list-section {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .cv p,
  .cv li {
    widows: 3;
    orphans: 3;
  }

  .cv a {
    color: #000;
    text-decoration: none;
  }
}
