:root {
  --paper: #f5f1e8;
  --ink: #25231f;
  --accent: #7a3038;
  --muted: #6f6a61;
  --rule: #d7d0c4;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", Arial, Helvetica, sans-serif;

  --page: 64rem;
  --reading: 42rem;
  --record: 52rem;
}


/* ---------- Base: canonical narrow layout ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--paper);
  color: var(--ink);

  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header,
main,
.site-footer {
  width: min(var(--page), calc(100% - 2rem));
  margin-inline: auto;
}


/* ---------- Keyboard and motion accessibility ---------- */

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.75rem;
  transform: translateY(-200%);

  background: var(--ink);
  color: var(--paper);

  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
}

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

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


/* ---------- Header ---------- */

.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.site-name {
  display: block;
  margin-bottom: 0.7rem;

  color: var(--ink);

  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;

  text-decoration: none;
}

.site-name span {
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 400;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;

  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a {
  padding-block: 0.25rem;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}


/* ---------- Small labels ---------- */

.eyebrow {
  margin: 0;

  color: var(--accent);

  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}


/* ---------- Hero ---------- */

.hero {
  max-width: 49rem;
  padding: 3.6rem 0 3.9rem;
}

.hero h1 {
  margin: 0.55rem 0 1.1rem;

  font-size: clamp(2.05rem, 7vw, 2.65rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-intro {
  max-width: 43rem;
  margin: 0;

  font-size: 1.0625rem;
  line-height: 1.62;
}

.identity-hero h1 {
  margin-bottom: 0.35rem;
}

.hero-role {
  margin: 0 0 1.15rem;

  color: var(--accent);

  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}


/* ---------- General sections ---------- */

.section {
  padding: 1.6rem 0 3.5rem;
  border-top: 1px solid var(--rule);
}

.section-heading {
  margin-bottom: 1.15rem;
}

.section-heading h2 {
  max-width: 34rem;
  margin: 0.45rem 0 0;

  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.02em;
}


/* ---------- Project listings ---------- */

.project {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;

  padding: 1.5rem 0 1.8rem;
  border-top: 1px solid var(--rule);
}

.project-number {
  grid-column: 1;
  margin: 0.12rem 0 0;

  color: var(--accent);

  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.project-copy {
  grid-column: 2;
  max-width: 40rem;
  min-width: 0;
}

.project-copy h2,
.project-copy h3 {
  margin: 0 0 0.45rem;

  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.015em;
}

.project-copy p {
  margin: 0 0 0.7rem;

  font-size: 1rem;
  line-height: 1.62;
}

.project-copy a,
.quiet-link {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
}

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

.project-meta {
  grid-column: 2;

  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;

  min-width: 0;
  padding-top: 0.3rem;
  color: var(--muted);

  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.project-meta p {
  margin: 0;
}

.project-meta span {
  display: block;
  margin-bottom: 0.15rem;

  color: var(--accent);

  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}


/* ---------- Research preview ---------- */

.research-preview,
.currently {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.research-copy,
.currently > p:last-child {
  max-width: var(--reading);
  min-width: 0;
}

.research-copy > p,
.currently > p:last-child {
  margin: 0;

  font-size: 1.0625rem;
  line-height: 1.65;
}

.research-themes {
  display: grid;
  grid-template-columns: 1fr;

  margin: 1.5rem 0 1.25rem;
  padding: 0;

  border-top: 1px solid var(--rule);
  list-style: none;
}

.research-themes li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);

  font-size: 1rem;
}


/* ---------- Professional record ---------- */

.record-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.record-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  min-width: 0;
}

.record-grid > div {
  min-width: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.record-grid span {
  color: var(--accent);

  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.record-grid strong {
  display: block;
  margin: 0.35rem 0 0.45rem;

  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.38;
}

.record-grid p {
  margin: 0;

  color: var(--muted);

  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.55;
}


/* ---------- Individual project page ---------- */

.project-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;

  color: var(--muted);

  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.project-detail-meta p {
  margin: 0;
}

.project-detail-meta span {
  display: block;
  margin-bottom: 0.15rem;

  color: var(--accent);

  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-detail-body {
  max-width: var(--reading);
  min-width: 0;
}

.project-detail-body section {
  padding: 0 0 2.8rem;
}

.project-detail-body .eyebrow {
  margin-bottom: 0.5rem;
}

.project-detail-body h2 {
  max-width: 38rem;
  margin: 0 0 0.95rem;

  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.27;
  letter-spacing: -0.015em;
}

.project-detail-body p:not(.eyebrow) {
  margin: 0 0 1rem;

  font-size: 1rem;
  line-height: 1.68;
}

.project-detail-body p.project-output {
  margin-top: 0.9rem;

  color: var(--muted);

  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.55;
}

.project-output span {
  display: block;
  margin-bottom: 0.15rem;

  color: var(--accent);

  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.related-links {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
}

.related-links li {
  margin-bottom: 0.5rem;
  line-height: 1.58;
}


/* ---------- CV ---------- */

.cv-hero {
  padding-bottom: 3.8rem;
}

.cv-hero .hero-intro {
  margin-bottom: 1.25rem;
}

.cv-utility {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;

  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
}

.cv-utility a {
  padding-block: 0.2rem;
}

.cv-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;

  max-width: var(--record);

  padding: 1.6rem 0 3.1rem;
  border-top: 1px solid var(--rule);
}

.cv-section > h2 {
  margin: 0;

  color: var(--accent);

  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cv-entry,
.cv-publication {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;

  min-width: 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}

.cv-section > .cv-entry:nth-child(2),
.cv-section > .cv-publication:nth-child(2) {
  padding-top: 0;
  border-top: none;
}

.cv-date {
  color: var(--muted);

  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.cv-entry h3 {
  margin: 0 0 0.2rem;

  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.34;
}

.cv-institution {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
}

.cv-entry p {
  margin: 0.25rem 0 0;

  font-size: 1rem;
  line-height: 1.62;
}

.cv-entry ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;

  font-size: 1rem;
  line-height: 1.62;
}

.cv-entry li {
  margin-bottom: 0.35rem;
}

.cv-publication p {
  margin: 0;

  font-size: 1rem;
  line-height: 1.62;
}

.cv-skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  min-width: 0;
}

.cv-skills > div {
  min-width: 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
}

.cv-skills h3 {
  margin: 0 0 0.35rem;

  color: var(--accent);

  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cv-skills p {
  margin: 0;

  font-size: 1rem;
  line-height: 1.62;
}

.cv-updated {
  margin: 0 0 3rem;

  color: var(--muted);

  font-family: var(--sans);
  font-size: 0.8125rem;
}


/* ---------- Footer ---------- */

.site-footer {
  padding: 1.4rem 0 2.4rem;
  border-top: 1px solid var(--rule);

  color: var(--muted);

  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;

  margin-top: 0.7rem;
}

.site-footer a {
  padding-block: 0.15rem;
  color: var(--ink);
}


/* ---------- Intermediate enhancement ---------- */

@media (min-width: 34rem) {
  .cv-entry,
  .cv-publication {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 1.25rem;
  }

  .cv-skills {
    grid-template-columns: 1fr 1fr;
    gap: 1.3rem 1.7rem;
  }
}


@media (min-width: 48rem) {
  .site-header,
  main,
  .site-footer {
    width: min(var(--page), calc(100% - 3rem));
  }

  .site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;

    padding: 1.35rem 0 1.2rem;
  }

  .site-name {
    margin-bottom: 0;
    font-size: 1.4rem;
  }

  .site-nav {
    justify-content: flex-end;
    gap: 1.4rem;
  }

  .hero {
    padding: 4.7rem 0 4.9rem;
  }

  .hero-intro {
    font-size: 1.125rem;
    line-height: 1.6;
  }

  .section {
    padding: 2.2rem 0 4.25rem;
  }

  .section-heading h2 {
    font-size: 1.55rem;
    line-height: 1.2;
  }

  .project {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 1.25rem;

    padding: 1.7rem 0 1.95rem;
  }

  .project-copy h2,
  .project-copy h3 {
    font-size: 1.35rem;
  }

  .project-meta {
    gap: 1rem 1.7rem;
  }

  .research-copy > p,
  .currently > p:last-child {
    font-size: 1.08rem;
    line-height: 1.62;
  }

  .research-themes {
    grid-template-columns: 1fr 1fr;
  }

  .research-themes li {
    padding: 0.85rem 1rem 0.85rem 0;
  }

  .research-themes li:nth-child(odd) {
    border-right: 1px solid var(--rule);
  }

  .research-themes li:nth-child(even) {
    padding-left: 1rem;
  }

  .record-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .cv-section {
    padding: 2rem 0 3.6rem;
  }

  .cv-entry,
  .cv-publication {
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: 1.35rem;
  }

  .site-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
  }

  .site-footer nav {
    justify-content: flex-end;
    margin-top: 0;
  }
}


/* ---------- Wide editorial enhancement ---------- */

@media (min-width: 60rem) {
  .project {
    grid-template-columns: 2.8rem minmax(0, 1fr) 12rem;
    gap: 1.8rem;
  }

  .project-meta {
    grid-column: 3;
    display: block;
    padding-top: 0;
  }

  .project-meta p {
    margin: 0 0 0.9rem;
  }

  .project-detail {
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 3.2rem;
    align-items: start;
  }

  .project-detail-meta {
    position: sticky;
    top: 2rem;

    display: block;
  }

  .project-detail-meta p {
    margin: 0 0 1rem;
  }
}


@media (min-width: 64rem) {
  .record-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.7rem;
  }
}


/* ---------- Motion and print ---------- */

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

@media print {
  body {
    background: white;
  }

  .site-nav,
  .site-footer {
    display: none;
  }

  .project-detail-meta {
    position: static;
  }
}
