:root {
  --paper: rgba(244, 232, 208, 0.82);
  --paper-solid: #f7f4ea;
  --ink: #0d1411;
  --muted: #1c2a24;
  --line: rgba(23, 54, 35, 0.22);
  --leaf: #0e3d26;
  --leaf-light: #145233;
  --moss: #73894d;
  --sun: #d49b43;
  --white: #fffef9;
  --sans: "Open Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background:
    linear-gradient(115deg, rgba(4, 21, 10, 0.28), rgba(8, 37, 17, 0.12)),
    url("photos/perm/rainforest.jpg") center / cover no-repeat;
  background-color: #0d2114;
  background-attachment: scroll;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(to bottom, rgba(5, 18, 9, 0.02), rgba(5, 18, 9, 0.14));
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--leaf-light);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.8rem;
  color: var(--white);
  background: var(--leaf);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-frame {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: calc(100% - 1rem);
  margin: clamp(0.5rem, 2vw, 2rem) auto;
  overflow: hidden;
  background: transparent;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
}

.identity {
  display: flex;
  width: fit-content;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.12rem;
  justify-self: start;
  max-width: 42rem;
}

.also-known-as {
  align-self: flex-end;
  color: var(--leaf);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.eyebrow,
.kicker,
.meta,
.section-number,
.work-year,
.timeline-date {
  margin: 0;
  color: var(--leaf);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  color: var(--leaf);
  font-family: var(--sans);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 1.1rem;
  max-width: 42rem;
  margin-left: auto;
  padding-top: 0;
}

nav a {
  color: var(--leaf);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 160ms ease;
  white-space: nowrap;
}

nav a:hover,
nav a:focus-visible {
  opacity: 1;
}

nav a::after {
  display: block;
  width: 0;
  height: 1px;
  margin-top: 0.2rem;
  content: "";
  background: var(--leaf);
  transition: width 160ms ease;
}

nav a:hover::after {
  width: 100%;
}

main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

main > section {
  padding: clamp(0.75rem, 1.4vw, 1rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
}

.overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0;
  background: transparent;
  border: 0;
}

.about-panel,
.work-panel {
  min-width: 0;
  padding: clamp(0.75rem, 1.4vw, 1rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
}

.work-panel {
  padding-top: clamp(0.75rem, 1.4vw, 1rem);
}

.intro {
  display: block;
}

.intro::after {
  display: block;
  clear: both;
  content: "";
}

h2 {
  margin: 0.3rem 0 0;
  font-family: var(--sans);
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.intro-copy {
  max-width: 48rem;
}

.profile-column {
  display: flex;
  float: left;
  width: 10.5rem;
  margin: 0 1.25rem 0.75rem 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 1rem;
}

.profile-photo {
  width: min(100%, 10.5rem);
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid rgba(255, 254, 249, 0.82);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(7, 30, 15, 0.18);
}

.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.45);
  transform-origin: 86% 32%;
}

.social-placeholders {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-self: center;
  gap: 0.42rem;
}

.social-placeholders a {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--leaf);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 254, 249, 0.62);
  border: 1px solid var(--line);
  border-radius: 50%;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.social-placeholders a:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.social-placeholders svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

.logo-linkedin {
  fill: #0a66c2;
}

.logo-substack {
  fill: #ff6719;
}

.logo-github {
  fill: #181717;
}

.logo-scholar {
  fill: #4285f4;
}

.intro-copy p {
  max-width: 43rem;
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: clamp(0.94rem, 1.4vw, 1.02rem);
  line-height: 1.7;
}

.intro-copy p:not(.eyebrow) {
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
}

.intro-copy {
  justify-self: end;
  max-width: none;
  margin-top: 0;
}

.intro-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-transform: none;
}

.overview .intro-copy p {
  max-width: none;
  font-size: clamp(0.86rem, 1.15vw, 0.96rem);
  line-height: 1.62;
}

.overview .section-title {
  margin-bottom: 0.9rem;
}

.intro-opening {
  margin-top: 0 !important;
}

.intro-opening strong {
  font-weight: 700;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.section-title {
  margin: 0 0 0.7rem;
  color: var(--leaf);
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.section-copy p {
  max-width: none;
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: clamp(0.86rem, 1.15vw, 0.96rem);
  line-height: 1.62;
  text-align: left;
}

.section-copy p:last-child {
  margin-bottom: 0;
}

.section-copy strong,
.section-copy strong a {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.section-copy strong a:hover {
  text-decoration: underline;
}

.section-copy .work-year {
  margin-right: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  vertical-align: 0.05em;
}

.paper-authors {
  color: var(--muted);
  font-weight: 400;
}

.entry-summary {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
}

.section-copy .text-link {
  margin-left: 0.35rem;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 54rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  padding: 0.3rem 0.7rem;
  color: var(--leaf);
  font-size: 0.82rem;
  font-weight: 650;
  background: rgba(255, 254, 249, 0.66);
  border: 1px solid var(--line);
  border-radius: 99px;
}

.experience-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.experience-column {
  min-width: 0;
  padding: 0.85rem;
  background: transparent;
  border: 1px solid var(--line);
}

.experience-column > h3 {
  margin: 0 0 0.45rem;
  color: var(--leaf);
  font-size: 1.05rem;
  font-weight: 700;
}

.experience-role {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}

.experience-role-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
}

.experience-role h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.experience-role-heading > div > p {
  margin: 0.12rem 0 0;
  color: var(--leaf);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
}

.experience-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.role-keywords {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.28rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.role-keywords li {
  padding: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
}

.role-keywords li:not(:last-child)::after {
  content: "·";
  margin-left: 0.35rem;
}

.other-grid h3,
.selected-work > h3 {
  margin: 0.6rem 0 0;
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
}

.other-grid article > p:last-of-type {
  margin-bottom: 0;
  color: var(--muted);
}

.selected-work {
  margin: 0;
}

.selected-work > h3 {
  margin: 0 0 1rem;
}

.work-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.work-item:last-child {
  border-bottom: 1px solid var(--line);
}

.work-year {
  padding-top: 0.22rem;
}

.work-item h4 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 600;
}

.work-item p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.text-link {
  display: inline-block;
  margin-top: 0.55rem;
  color: var(--leaf);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.other-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin-left: 0;
}

.other-grid article {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  overflow: auto;
  padding: 1.35rem;
  background: transparent;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: clamp(0.86rem, 1.15vw, 0.96rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.62;
  text-transform: none;
}

.other-grid .meta,
.other-grid p,
.other-grid a {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: none;
}

.other-grid .meta {
  font-weight: 700;
}

.note-card p {
  margin: 0 0 0.45rem;
}

.note-box {
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.65rem 0.2rem;
  border: 1px solid var(--line);
}

.note-card .note-label {
  display: block;
  margin-bottom: 0.1rem;
  color: var(--leaf);
  font-weight: 700;
}

.note-card .note-aside {
  color: var(--muted);
}

.note-card .text-link {
  display: inline-block;
  margin-top: 0.85rem;
}

.photo-note {
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0.45rem 0.45rem !important;
  overflow: hidden;
}

.photo-note .meta {
  margin: 0 0 0.35rem;
  padding: 0.2rem 0.2rem 0;
}

.photo-collage {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.22rem;
  min-height: 0;
}

.photo-collage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.tune-note {
  display: flex;
  flex-direction: column;
  padding: 0.75rem !important;
  overflow: hidden;
}

.tune-note .meta {
  margin-bottom: 0.45rem;
}

.tune-note iframe {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0.45rem;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding: 0.35rem clamp(1.5rem, 3vw, 2.5rem);
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--line);
}

footer p {
  margin: 0;
}

footer a {
  color: var(--leaf);
  text-decoration: none;
}

#last-updated {
  text-transform: none;
}

@media (max-width: 1800px) {
  .other-grid .tune-note {
    aspect-ratio: auto;
    height: auto;
    overflow: hidden;
  }

  .other-grid .tune-note iframe {
    flex: none;
    height: 480px;
    min-height: 480px;
  }
}

@media (min-width: 821px) and (max-width: 1800px) {
  .other-grid {
    align-items: stretch;
  }

  .other-grid article {
    aspect-ratio: auto;
  }

  .other-grid .photo-note,
  .other-grid .note-card {
    height: 0;
    min-height: 100%;
  }
}

@media (max-width: 820px) {
  nav {
    gap: 0.4rem 0.75rem;
    max-width: 20rem;
  }

  nav a {
    font-size: 0.62rem;
  }

  .other-grid {
    grid-template-columns: 1fr;
  }

  .experience-role-heading {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .experience-date {
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  body {
    background-attachment: scroll;
  }

  .site-frame {
    width: 100%;
    margin: 0;
    border: 0;
  }

  .masthead {
    padding: 1.25rem;
  }

  main > section {
    padding: 0.85rem 1.25rem;
  }

  .about-panel,
  .work-panel {
    padding: 0.85rem 1.25rem;
  }

  h1 {
    font-size: 1.3rem;
  }

  nav {
    gap: 0.55rem 1rem;
  }

  .lede,
  .keyword-list,
  .selected-work,
  .other-grid {
    margin-left: 0;
  }

  .work-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .intro-copy p:not(.eyebrow),
  .entry-summary {
    text-align: left;
    text-justify: auto;
  }

  a {
    text-underline-offset: 0.08em;
  }

  .profile-column {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
    align-items: flex-start;
  }

  .profile-photo,
  .social-placeholders {
    align-self: center;
  }

  .profile-photo {
    width: 12.5rem;
  }

  .social-placeholders {
    justify-content: center;
    width: 12.5rem;
  }

  footer {
    padding: 1.1rem 1.25rem;
  }
}

@media (max-width: 500px) {
  .masthead {
    grid-template-columns: 1fr;
  }

  .experience-columns {
    grid-template-columns: 1fr;
  }

  nav {
    justify-content: flex-start;
    margin-left: 0;
  }
}

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

  * {
    transition: none !important;
  }
}
