:root {
  --bg: #fbf6ec;
  --paper: #fffdf7;
  --ink: #2d251f;
  --muted: #766c62;
  --line: #ddd1bf;

  --accent: #8f45d6;
  --accent-2: #c184fa;
  --soft: #f0e1ff;

  --shadow: 0 24px 80px rgba(57, 37, 22, 0.08);

  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body,
p,
a,
li,
nav,
button,
input,
textarea {
  font-family: var(--sans);
}

h1,
h2,
h3,
.mark {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

a {
  color: inherit;
  text-decoration-color: rgba(138, 63, 45, .35);
  text-underline-offset: .18em;
}

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

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

.shell {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.narrow {
  width: min(920px, calc(100% - 48px));
}

.muted {
  color: var(--muted);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(24px, 5vw, 64px);
  background: rgba(251, 246, 236, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(221, 209, 191, .75);
}

.mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
}

.mark:hover {
  color: var(--bg);
  background: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1;
}

.site-nav .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  background: var(--soft);
  color: var(--ink);
}

/* Shared labels */

.eyebrow,
.pub-tag,
.portrait-note span,
.quick-strip span,
.contact-link-card span {
  color: var(--accent);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 14px;
}

/* Hero */

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding: clamp(44px, 6vw, 76px) 0 36px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(3.1rem, 7vw, 5.8rem);
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(2.35rem, 5vw, 4.4rem);
}

.hero-title {
  max-width: 720px;
  margin: 24px 0 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
}

.hero-text,
.page-hero p {
  max-width: 720px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Page hero */

.page-hero {
  padding: clamp(56px, 8vw, 96px) 0 clamp(36px, 5vw, 58px);
}

.page-hero p {
  margin-top: 20px;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .32);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease;
}

.button.primary {
  background: var(--ink);
  color: var(--soft);
  border-color: var(--ink);
}

.button:hover {
  transform: translateY(-1px);
  color: var(--accent);
}

.button.primary:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* Portrait + profile links */

.portrait-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(.35deg);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  object-position: center bottom;
  background: var(--soft);
}

.portrait-note {
  display: grid;
  gap: 5px;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.profile-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  line-height: 1;
}

.profile-links a:hover {
  color: var(--accent-2);
}

.profile-links svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Quick strip */

.quick-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  margin-top: -16px;
}

.quick-strip div {
  background: rgba(255, 253, 247, .58);
  padding: 18px 20px;
  font-weight: 600;
}

.quick-strip span {
  display: block;
  margin-bottom: 6px;
}

/* Sections */

.section {
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid rgba(221, 209, 191, .75);
}

.compact-section {
  padding-top: 64px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading h2,
.two-col h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.45rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.section-heading.split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent-2);
}

/* Research theme cards */

.research-theme-section {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid rgba(221, 209, 191, .75);
}

.research-theme-section .section-heading,
.research-theme-section .section-heading h2 {
  max-width: 940px;
}

.card-grid {
  display: grid;
  gap: 16px;
}

.card-grid.five {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.card-grid.five .theme-card {
  height: 440px;
  min-height: 430px;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 185px 92px 1fr;
  gap: 0;
  background: rgba(255, 253, 247, .66);
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.theme-graphic {
  width: 100%;
  height: 185px;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 23px 23px 0 0;
}

.theme-card-heading {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 6px;
  align-items: start;
  padding: 18px 18px 0;
}

.theme-card-heading span,
.theme-card-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.08vw, 1.18rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.14;
}

.theme-card-heading span {
  color: var(--accent);
}

.theme-card-heading h3 {
  color: var(--ink);
}

.card-grid.five .theme-card p {
  margin: 0;
  padding: 2px 20px;
  color: rgba(45, 37, 31, .85);
  font-family: var(--sans);
  font-size: .96rem;
  line-height: 1.45;
}

.card-grid.five .theme-card:hover {
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  transform: translateY(-2px);
}

/* Selected work / recent publications */

.selected-work-section {
  padding-top: clamp(64px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 86px);
}

.selected-work-heading {
  margin-bottom: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}

.selected-work-heading .text-link {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: .95rem;
  font-weight: 700;
}

.selected-work-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(221, 209, 191, .9);
}

.selected-work-list .publication-item {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.selected-work-list .pub-topline {
  margin-bottom: 8px;
  min-height: 24px;
}

.selected-work-list .pub-badge {
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
}

.selected-work-list .publication-item h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.selected-work-list .publication-item p {
  margin: 18px 0 0;
  color: rgba(45, 37, 31, .72);
  font-family: var(--sans);
  font-size: .96rem;
  line-height: 1.65;
}

/* Full publications page */

.pubs-page {
  padding-top: 18px;
}

.pub-year {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.pub-year h2 {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.publication-list {
  display: grid;
  gap: 0;
}

.publication-item {
  padding: 28px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(221, 209, 191, .9);
}

.publication-item:first-child {
  padding-top: 0;
}

.pub-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pub-tag {
  margin: 0;
}

.pub-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.publication-item h3 {
  margin: 0;
  max-width: 1000px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.9vw, 1.4rem);
  font-weight: 420;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.pub-authors {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
}

.paper-icons {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  margin-left: 8px;
  white-space: nowrap;
  vertical-align: baseline;
}

.paper-icons a {
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.paper-icons a:hover {
  color: var(--accent-2);
}

.paper-icons i {
  font-size: 1rem;
}

/* CV / design projects */

.two-col {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(28px, 6vw, 80px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.project-grid article {
  padding: 20px;
  background: rgba(255, 253, 247, .66);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.project-grid h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.18;
}

.project-grid p {
  color: var(--muted);
  margin-bottom: 0;
}

.project-grid a {
  color: var(--accent);
  font-weight: 700;
}

/* Contact page */

.contact-links-section {
  padding-top: 16px;
}

.contact-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact-link-card {
  min-height: 150px;
  padding: 26px;
  background: rgba(255, 253, 247, .66);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.contact-link-card span {
  display: block;
  margin-bottom: 10px;
}

.contact-link-card h2 {
  margin: 0 0 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.contact-link-card a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
}

.contact-link-card a:hover {
  color: var(--accent);
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px clamp(24px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Responsive */

@media (max-width: 1180px) {
  .card-grid.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid.five .theme-card {
    height: 390px;
    min-height: 390px;
    grid-template-rows: 180px 76px 1fr;
  }

  .theme-graphic {
    height: 180px;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3rem, 11vw, 5rem);
  }

  .page-hero h1 {
    font-size: clamp(2.25rem, 8vw, 3.8rem);
  }

  .portrait-card {
    max-width: 460px;
  }

  .quick-strip,
  .publication-list.selected,
  .pub-year,
  .two-col {
    grid-template-columns: 1fr;
  }

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

  .selected-work-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .selected-work-heading .text-link {
    margin-bottom: 0;
  }

  .selected-work-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

@media (max-width: 760px) {

  .quick-strip,
  .contact-link-grid {
    grid-template-columns: 1fr;
  }

  .pub-year {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pub-year h2 {
    font-size: 2.2rem;
  }

  .publication-item {
    padding: 22px 0;
  }
}

@media (max-width: 620px) {

  .shell,
  .narrow {
    width: min(100% - 32px, 1160px);
  }

  .site-header {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 4px;
  }

  .site-nav .nav-link {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 13px;
  }

  .hero {
    padding-top: 42px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 4.1rem);
  }

  .page-hero h1 {
    font-size: clamp(2.05rem, 10vw, 3.2rem);
  }

  .section {
    padding: 56px 0;
  }

  .section-heading.split {
    display: block;
  }

  .text-link {
    display: inline-block;
    margin-top: 16px;
  }

  .card-grid.five {
    grid-template-columns: 1fr;
  }

  .card-grid.five .theme-card {
    height: auto;
    min-height: 0;
    grid-template-rows: auto;
  }

  .theme-graphic {
    height: 200px;
  }

  .theme-card-heading {
    padding-top: 18px;
  }

  .contact-link-card {
    min-height: auto;
  }

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

/* Selected work / recent publications */

.selected-work-section {
  padding-top: clamp(64px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 86px);
}

.selected-work-heading {
  margin-bottom: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}

.selected-work-heading .text-link {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}

.selected-work-heading .text-link:hover {
  color: var(--accent-2);
}

.selected-work-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 44px;
  row-gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(221, 209, 191, .9);
}

.selected-paper {
  display: block;
  color: inherit;
  text-decoration: none;
}

.selected-paper:hover {
  color: inherit;
}

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

.selected-work-list .publication-item {
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.selected-work-list .pub-topline {
  min-height: 24px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-work-list .pub-tag {
  color: var(--accent);
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
}

.selected-work-list .pub-badge {
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
}

.selected-work-list .publication-item h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.22rem, 1.65vw, 1.48rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.16;
  transition: color .18s ease;
}

.selected-work-list .publication-item p {
  margin: 18px 0 0;
  color: rgba(45, 37, 31, .72);
  font-family: var(--sans);
  font-size: .96rem;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .selected-work-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .selected-work-heading .text-link {
    margin-bottom: 0;
  }

  .selected-work-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Better hover state for selected homepage papers */

.selected-paper {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 14px 16px;
  margin: -14px -16px;
  border-radius: 18px;
  transition: background .18s ease, transform .18s ease;
}

.selected-paper:hover {
  background: rgba(193, 132, 250, .12);
  transform: translateY(-2px);
  color: inherit;
}

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

.selected-paper:hover .pub-tag {
  color: var(--accent-2);
}

.selected-paper:hover p {
  color: rgba(45, 37, 31, .9);
}

/* Makes anchor links land neatly above the publication item, not below it */

html {
  scroll-padding-top: 100px;
}

.publication-item[id] {
  scroll-margin-top: 110px;
}


/* Matching soft hover state for research theme cards — no shadow/overlay */

.card-grid.five .theme-card {
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

.card-grid.five .theme-card:hover {
  background: rgba(193, 132, 250, .12);
  border-color: rgba(193, 132, 250, .45);
  box-shadow: none;
  transform: translateY(-2px);
  color: inherit;
}

.card-grid.five .theme-card:hover h3 {
  color: var(--accent);
}

.card-grid.five .theme-card:hover .theme-card-heading span {
  color: var(--accent-2);
}

.card-grid.five .theme-card:hover p {
  color: rgba(45, 37, 31, .9);
}

.card-grid.five .theme-card:hover .theme-graphic {
  filter: none;
}

/* Final standard eyebrow styling across all pages */

.eyebrow {
  display: block;
  margin: 0 0 14px !important;

  color: var(--accent) !important;
  font-family: var(--sans) !important;
  font-size: .76rem !important;
  font-weight: 700 !important;
  letter-spacing: .16em !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

