:root {
  --bg: #faf8f4;
  --text: #161616;
  --muted: #5b5b5b;
  --line: #d8d3ca;
  --accent: #6f1d1b;
  --max: 1180px;
  --reading: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

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

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

.site-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}


/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 96%, white 4%);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-title {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 1.22rem;
  text-decoration: none;
  letter-spacing: -0.015em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a.active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.4em;
}

.site-nav .cv-link {
  border: 1px solid #777;
  padding: 7px 11px;
}

.nav-toggle {
  display: none;
}


/* Main layout */

main {
  padding: 64px 0 80px;
}


/* Homepage hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 64px;
  align-items: center;
  padding: 22px 0 52px;
}

.hero.no-visual {
  grid-template-columns: 1fr;
}

.eyebrow {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero-name {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  margin: 0 0 22px;
}

.hero-role {
  font-size: clamp(2rem, 4.4vw, 4.25rem);
  line-height: 1.08;
  font-weight: 400;
  margin: 0 0 26px;
  max-width: 900px;
}

.hero-intro {
  max-width: 720px;
  font-size: 1.18rem;
  color: #2f2f2f;
  margin: 0;
}

.hero-visual {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 40px;
  font-size: 0.95rem;
  text-align: center;
}

.hero-visual img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* Homepage sections */

.section {
  border-top: 1px solid var(--line);
  padding: 30px 0 34px;
}

.section h2,
.page-header h1 {
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.project-list {
  display: grid;
  grid-template-columns: 260px 1fr;
  column-gap: 32px;
  row-gap: 8px;
}

.project-list dt {
  font-size: 1.11rem;
}

.project-list dd {
  margin: 0;
  color: #373737;
}

.home-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.home-column h3 {
  font-size: 1.65rem;
  font-weight: 400;
  margin: 0 0 16px;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plain-list li {
  margin: 8px 0;
}

.more-link {
  display: inline-block;
  margin-top: 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  color: var(--accent);
}


/* Interior pages */

.page-header {
  max-width: var(--reading);
  margin-bottom: 44px;
}

.page-header h1 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.18rem;
  color: #3f3f3f;
  margin: 0;
}

.content {
  max-width: var(--reading);
}

.content h2 {
  font-size: 1.8rem;
  font-weight: 400;
  margin: 42px 0 14px;
}

.content h3 {
  font-size: 1.3rem;
  margin: 30px 0 10px;
}

.content p {
  margin: 0 0 1.1em;
}

.content ul {
  padding-left: 1.3em;
}


/* Generic lists */

.item-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.item h2,
.item h3 {
  margin: 0 0 6px;
  font-weight: 400;
}

.item p {
  margin: 0;
  max-width: 850px;
  color: #3e3e3e;
}

.item-meta {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 7px;
}


/* Research bibliography */

.bibliography {
  max-width: 900px;
}

.bib-entry {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}

.bib-entry:first-child {
  border-top: 1px solid var(--line);
}

.bib-entry .title {
  font-size: 1.08rem;
}

.bib-entry .details {
  color: #454545;
  margin-top: 4px;
}

.bib-entry .links {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.86rem;
  margin-top: 6px;
}


/* Books page */

.book-list {
  margin-top: 2.5rem;
}

.book-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  grid-template-areas: "details cover";
  gap: 3rem;
  align-items: start;
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
}

.book-item:first-child {
  padding-top: 0;
  border-top: none;
}

.book-details {
  grid-area: details;
  min-width: 0;
}

.book-cover {
  grid-area: cover;
  width: 180px;
  justify-self: end;
}

.book-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.book-details h2 {
  margin: 0 0 0.45rem;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.2;
}

.book-meta {
  margin-bottom: 1rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
}

.book-details p {
  max-width: 700px;
  margin: 0 0 1rem;
  color: #353535;
}

.book-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
}

.book-links a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  color: var(--accent);
}


/* Projects page */

.projects-page-list {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  position: relative;
  border: 1px solid var(--line);
  padding: 2rem 2.25rem;
  background: rgba(255, 255, 255, 0.18);
}

/* Reserve room for a 200px logo on the right */
.project-card:has(.project-logo) {
  padding-right: 16rem;
}

.project-card h2 {
  margin: 0.2rem 0 0.7rem;
  font-size: 1.8rem;
  font-weight: 400;
}

.project-card p {
  max-width: 760px;
  margin: 0;
  color: #3a3a3a;
}

.project-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
}

.project-links a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  color: var(--accent);
}

.project-logo {
  position: absolute;
  right: 2.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* Footer */
/* This is restored from the original stylesheet. */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}


/* Tablet / smaller desktop */

@media (max-width: 850px) {
  .site-shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .header-inner {
    min-height: 70px;
    align-items: flex-start;
    padding: 19px 0;
    flex-direction: column;
    gap: 14px;
  }

  .site-nav {
    gap: 16px 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 8px;
  }

  .hero-visual {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 26px 0 0;
    min-height: 0;
  }

  .project-list {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }

  .project-list dd {
    margin-bottom: 12px;
  }

  .home-columns {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .book-item {
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 2rem;
  }

  .book-cover {
    width: 140px;
  }

  .project-card:has(.project-logo) {
    padding-right: 10rem;
  }

  .project-logo {
    right: 1.5rem;
    width: 120px;
    height: 120px;
  }
}


/* Phones */

@media (max-width: 560px) {
  main {
    padding-top: 42px;
  }

  .book-item {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .book-details {
    order: 1;
  }

  .book-cover {
    order: 2;
    width: 130px;
    align-self: flex-start;
  }

  .project-card {
    padding: 1.5rem;
  }

  .project-card:has(.project-logo) {
    padding-right: 1.5rem;
    padding-bottom: 9rem;
  }

  .project-logo {
    right: 1.5rem;
    top: auto;
    bottom: 1.5rem;
    transform: none;
    width: 110px;
    height: 110px;
  }

  .footer-inner {
    flex-direction: column;
  }
}


/* Front page */

.home-hero {
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 5rem;
  align-items: center;
  padding: 2rem 0 5rem;
}

.home-hero-text {
  min-width: 0;
}

.home-hero .hero-name {
  margin-bottom: 1.6rem;
}

.home-hero .hero-role {
  max-width: 820px;
}

.home-hero .hero-intro {
  max-width: 700px;
}

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

.home-portrait img {
  display: block;
  width: 100%;
  height: auto;
}


/* Smaller screens */

@media (max-width: 850px) {
  .home-hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 2.5rem;
    align-items: center;
  }

  .home-portrait {
    max-width: 240px;
  }
}


/* Phones */

@media (max-width: 650px) {
  .home-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
    padding-top: 1rem;
  }

  .home-portrait {
    width: min(100%, 300px);
    max-width: 300px;
    justify-self: auto;
  }
}


/* About page */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 4.5rem;
  align-items: start;
}

.about-text {
  max-width: var(--reading);
}

.about-text .page-header {
  margin-bottom: 2rem;
}

.about-text p {
  margin: 0 0 1.2em;
  font-size: 1.08rem;
}

.about-photo {
  width: 100%;
  max-width: 320px;
  justify-self: end;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
}


/* Smaller screens */

@media (max-width: 800px) {
  .about-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 2.5rem;
  }

  .about-photo {
    max-width: 220px;
  }
}


/* Phones */

@media (max-width: 600px) {
  .about-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .about-photo {
    width: min(100%, 280px);
    max-width: 280px;
  }
}