:root {
  --paper: #f7f5ee;
  --stone: #ede9df;
  --ink: #24231f;
  --muted: #555146;
  --line: #d4cfc2;
  --accent: #a43621;
  --accent-dark: #822715;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(1.25rem, 6vw, 5.75rem);
}

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

html { scroll-padding-top: 1.25rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
}

h2 {
  font-size: clamp(2.5rem, 4.4vw, 4.25rem);
  letter-spacing: -.045em;
  line-height: 1.01;
}

h3 { line-height: 1.16; }

a { color: inherit; }

button { font: inherit; }

[hidden] { display: none !important; }

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

::selection {
  color: var(--ink);
  background: #f0c0a7;
}

.wrap {
  width: min(78rem, calc(100% - var(--gutter) - var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  transform: translateY(-160%);
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

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

.site-header { border-bottom: 1px solid var(--line); }

.header-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: 5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .7rem;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}

.monogram {
  display: grid;
  place-items: center;
  width: 2.25rem;
  aspect-ratio: 1;
  background: var(--ink);
  color: var(--paper);
  font: 600 .83rem var(--mono);
  letter-spacing: -.075em;
}

.main-nav {
  display: flex;
  gap: clamp(1rem, 2.8vw, 2.35rem);
  align-items: center;
  font-size: .875rem;
  font-weight: 600;
}

.main-nav a {
  padding-block: .45rem;
  text-decoration: none;
}

.main-nav a:hover, .wordmark:hover, .text-link:hover { color: var(--accent); }

.print-button {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: .6rem;
  min-height: 2.65rem;
  padding: .5rem .8rem;
  border: 1px solid #a6a092;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.print-button:hover {
  border-color: var(--ink);
  background: var(--stone);
}

.print-icon {
  position: relative;
  display: block;
  width: .95rem;
  height: .62rem;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.print-icon::before, .print-icon::after {
  position: absolute;
  left: .14rem;
  width: .54rem;
  height: .36rem;
  border: 1px solid currentColor;
  background: var(--paper);
  content: "";
}

.print-icon::before { top: -.29rem; }
.print-icon::after { bottom: -.24rem; }
.print-button:hover .print-icon::before,
.print-button:hover .print-icon::after { background: var(--stone); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5.8vw, 5.5rem);
  padding-block: clamp(3.3rem, 6.3vw, 5.8rem) clamp(3.75rem, 6vw, 5.25rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
}

.location-mark {
  width: .49rem;
  height: .49rem;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(4.5rem, 8.65vw, 8.65rem);
  font-weight: 750;
  letter-spacing: -.039em;
  line-height: .91;
}

.degree {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

.surname { display: block; }

.hero-role {
  margin-top: 1.55rem;
  font-family: var(--display);
  font-size: clamp(1.24rem, 2vw, 1.7rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -.035em;
}

.hero-intro {
  max-width: 29rem;
  margin-top: .75rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem 1.35rem;
  margin-top: 1.55rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: .68rem .95rem .68rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.arrow {
  position: relative;
  display: inline-block;
  flex: none;
  width: .7em;
  height: .7em;
}

.arrow::before, .arrow::after {
  position: absolute;
  content: "";
}

.arrow::before {
  top: 0;
  right: 0;
  width: .44em;
  height: .44em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.arrow::after {
  top: 50%;
  left: -.09em;
  width: .84em;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-45deg);
}

.arrow-down { transform: rotate(135deg); }

.button .arrow { font-size: 1.1em; }

.button-primary {
  background: var(--accent);
  color: #fffaf5;
}

.button-primary:hover { background: var(--accent-dark); }

.text-link {
  font-size: .875rem;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: .21em;
}

.text-link span {
  display: inline-block;
  margin-left: .12rem;
  text-decoration: none;
}

.hero-figure { min-width: 0; }

.hero-photo {
  position: relative;
  aspect-ratio: 1.22;
  overflow: hidden;
  background: #34302a;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.hero-photo::after {
  position: absolute;
  inset: .75rem;
  border: 1px solid rgba(255, 249, 230, .42);
  content: "";
  pointer-events: none;
}

.experience {
  padding-block: clamp(3.2rem, 6.4vw, 6rem);
  background: var(--stone);
  border-block: 1px solid var(--line);
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(0, .74fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}

.experience h2::before {
  display: block;
  width: 2.1rem;
  height: .2rem;
  margin-bottom: 1.2rem;
  background: var(--accent);
  content: "";
}

.experience-entry {
  display: grid;
  grid-template-columns: 9.8rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.25rem;
  border-top: 1px solid #c4bfb1;
}

.experience-entry:first-child { padding-top: .9rem; }

.experience-entry:last-child {
  padding-bottom: 0;
}

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

.experience-entry .date { padding-top: .15rem; }

.experience-entry h3 {
  font-size: 1.5rem;
  letter-spacing: -.035em;
}

.experience-entry .affiliation {
  margin-top: .12rem;
  color: var(--ink);
  font-size: .93rem;
  font-weight: 600;
}

.experience-entry .affiliation + p {
  margin-top: .55rem;
  color: var(--muted);
  font-size: .93rem;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .85rem 0 0;
  padding: 0;
  list-style: none;
}

.stack li {
  padding: .19rem .42rem;
  border: 1px solid #c7c1b3;
  font: 500 .675rem/1.45 var(--mono);
  color: var(--muted);
}

.projects { padding-block: clamp(3.4rem, 6.7vw, 6.25rem); }

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: .9rem;
  margin-top: 1.8rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border: 1px solid var(--line);
  background: #faf8f2;
}

.project-feature {
  grid-column: 2;
  grid-row: 1 / span 2;
  border-color: #d8c2b3;
  border-top: 3px solid var(--accent);
  padding-top: calc(clamp(1.25rem, 2.4vw, 2rem) - 2px);
  background: #f2e8df;
}

.project-category { color: var(--accent-dark); }

.project-card h3 {
  margin-top: .75rem;
  font-size: clamp(1.4rem, 2.15vw, 2rem);
  letter-spacing: -.037em;
}

.project-card > p:not(.project-category) {
  margin-top: .7rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: .9rem;
}

.project-card > p.project-thesis {
  margin-top: 0;
  padding-inline-start: .7rem;
  border-inline-start: 2px solid var(--accent);
}

.project-media {
  margin-top: .85rem;
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--stone);
}

.project-media figcaption {
  margin-top: .4rem;
  color: var(--muted);
  font: 500 .7rem/1.45 var(--mono);
}

.project-media-detail {
  max-width: 16rem;
  margin: .15rem 0 .8rem;
}

.project-card details {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.project-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 2.65rem;
  font-size: .855rem;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.project-card summary::-webkit-details-marker { display: none; }

.project-card summary:hover { color: var(--accent); }

.project-card summary:focus-visible { outline-offset: -1px; }

.detail-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: .75rem;
  height: .75rem;
}

.detail-mark::before, .detail-mark::after {
  position: absolute;
  width: .7rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.detail-mark::after { transform: rotate(90deg); }

details[open] .detail-mark::after { display: none; }

.project-card details p {
  padding-bottom: .75rem;
  color: var(--muted);
  font-size: .85rem;
}

.resource-link { display: inline-block; }

.project-card .resource-link { align-self: start; }

.credentials {
  border-top: 1px solid var(--line);
  padding-block: clamp(3.25rem, 6vw, 5.75rem);
}

.credentials-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.8rem, 6vw, 5.5rem);
}

.education-table {
  width: 100%;
  margin-top: 1.35rem;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

.education-study-col { width: 43%; }

.education-table th, .education-table td {
  padding: .9rem 0 .9rem 1.05rem;
  vertical-align: top;
}

.education-table th:first-child { padding-inline: 0 .6rem; }

.education-table thead th {
  padding-block: .55rem;
  border-block: 1px solid var(--line);
  background: var(--stone);
  color: var(--muted);
  font: 500 .73rem/1.4 var(--mono);
}

.education-table thead th:first-child { padding-inline-start: .55rem; }

.education-table tbody tr { border-bottom: 1px solid var(--line); }

.education-table tbody td {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.education-date, .education-program, .education-school, .education-specialization { display: block; }

.education-date { margin-bottom: .3rem; }

.education-program {
  font: 700 1.07rem/1.22 var(--display);
  letter-spacing: -.025em;
}

.education-school, .education-specialization {
  margin-top: .19rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.45;
}

.activities {
  margin-top: 1.85rem;
}

.activities > h2 {
  margin-bottom: .65rem;
  line-height: 1.16;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  letter-spacing: -.04em;
}

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

.activity-list li {
  padding-block: .75rem;
  border-top: 1px solid var(--line);
}

.activity-list h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.25;
}

.activity-list p {
  margin-top: .18rem;
  color: var(--muted);
  font-size: .9rem;
}

.activity-list .text-link {
  display: inline-block;
  margin-top: .22rem;
}

.svoc-table {
  width: 100%;
  margin-top: .55rem;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  font-size: .9rem;
}

.svoc-table th, .svoc-table td {
  padding: .55rem .6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.svoc-table th:first-child { width: 4.25rem; }

.svoc-table thead th, .svoc-table tbody th {
  color: var(--muted);
  font: 500 .73rem/1.45 var(--mono);
}

.svoc-table thead th {
  border-top: 1px solid var(--line);
  background: var(--stone);
}

.svoc-title {
  display: block;
  font-weight: 600;
  line-height: 1.38;
}

.publication {
  padding: clamp(1.35rem, 3vw, 2.25rem);
  background: var(--stone);
  border: 1px solid var(--line);
}

.publication h2 {
  font-size: clamp(1.65rem, 2.8vw, 2.5rem);
  letter-spacing: -.055em;
}

.publication-meta {
  margin-top: 1.2rem;
  color: var(--accent-dark);
}

.publication h3 {
  margin-top: .55rem;
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  letter-spacing: -.025em;
}

.publication h3 + p {
  margin-top: .6rem;
  color: var(--muted);
  font-size: .9rem;
}

.publication .resource-link { margin-top: 1rem; }

.contact {
  padding-block: 2.5rem;
  background: var(--ink);
  color: var(--paper);
}

.contact-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.contact h2 {
  font-size: clamp(2rem, 3.45vw, 3rem);
  letter-spacing: -.055em;
}

.contact p {
  margin-top: .4rem;
  color: #d4cfc2;
  font-size: .9rem;
}

.button-inverse {
  border-color: #a6a092;
  color: var(--paper);
}

.button-inverse:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.contact :focus-visible { outline-color: #f5ab8e; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .text-link, .print-button { transition: background-color .17s, color .17s, border-color .17s; }
}

@media screen and (max-width: 66rem) {
  .hero { gap: clamp(1.7rem, 4.5vw, 3.4rem); }
  .hero h1 { font-size: clamp(4.15rem, 8.75vw, 6.6rem); }
  .experience-entry { grid-template-columns: 8.8rem minmax(0, 1fr); }
}

@media screen and (max-width: 49rem) {
  :root { --gutter: clamp(1.25rem, 5vw, 2.5rem); }

  .header-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .4rem 1rem;
    padding-top: .8rem;
  }

  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: .75rem;
    padding-top: .22rem;
  }

  .main-nav a { padding-block: .6rem; }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.9rem;
    padding-block: 2.65rem 3.5rem;
  }

  .hero h1 { font-size: clamp(4rem, 13vw, 7.25rem); }
  .hero-photo { aspect-ratio: 1.45; }
  .hero-photo img { object-position: center 10%; }
  .experience-layout, .credentials-layout { grid-template-columns: minmax(0, 1fr); }
  .experience-layout { gap: 1.5rem; }
  .experience h2::before { margin-bottom: .8rem; }
  .desktop-break { display: none; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-feature { grid-column: auto; grid-row: auto; }
}

@media screen and (max-width: 34rem) {
  .education-table, .education-table tbody, .education-table tr,
  .education-table tbody th, .education-table tbody td { display: block; }

  .education-table colgroup { display: none; }

  .education-table thead {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .education-table { border-top: 1px solid var(--line); }
  .education-table tbody th { padding: .8rem 0 0; }
  .education-table tbody td { padding: .4rem 0 .8rem; }
}

@media screen and (max-width: 27rem) {
  .wordmark { gap: .5rem; font-size: .78rem; }
  .monogram { width: 1.95rem; }
  .print-button { padding-inline: .55rem; }
  .hero-intro { font-size: .93rem; }
  .experience-entry { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
}

@page {
  size: A4;
  margin: 12mm 14mm;
}

@media print {
  :root { --ink: #181818; --muted: #292929; }

  body {
    background: #fff;
    color: var(--ink);
    font-size: 9.4pt;
    line-height: 1.35;
  }

  .wrap { width: 100%; }
  .skip-link, .site-header, .hero-figure, .hero-actions, .desktop-break, .project-media, .project-card details { display: none !important; }
  .hero, .experience-layout, .credentials-layout { display: block; }
  .hero, .experience, .projects, .credentials, .contact { padding: 0 0 4mm; background: none; border: 0; }

  .hero h1 {
    font-size: 26pt;
    letter-spacing: -.055em;
    line-height: 1;
  }

  .degree, .surname { position: static; display: inline; clip-path: none; }
  .hero-location { margin-bottom: 2mm; }
  .location-mark, .experience h2::before { display: none; }
  .hero-role { margin-top: 2mm; font-size: 12pt; }
  .hero-intro { margin-top: 1.5mm; max-width: none; font-size: 9.4pt; }

  h2, .contact h2 {
    margin-bottom: 1.5mm;
    font-size: 15pt;
    letter-spacing: -.035em;
  }

  .eyebrow, .stack li { font-size: 7.5pt; }
  .experience-entry {
    grid-template-columns: 32mm minmax(0, 1fr);
    padding-block: 1.8mm;
    gap: 2mm;
    break-inside: avoid;
  }

  .experience-entry:first-child { padding-top: 1.8mm; }
  .experience-entry h3, .project-card h3, .publication h3 {
    margin-top: 0;
    font-size: 10pt;
  }

  .experience-entry .affiliation, .experience-entry .affiliation + p, .project-card > p:not(.project-category),
  .publication h3 + p, .contact p, .text-link {
    margin-top: .8mm;
    font-size: 8.7pt;
  }

  .stack { margin-top: 1mm; }
  .stack li { padding: .15mm 1mm; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2mm; gap: 2mm; }
  .project-feature { grid-column: auto; grid-row: auto; }
  .project-card, .publication { padding: 2.5mm; background: none; border: 1px solid #aaa; break-inside: avoid; }
  .project-card h3 { margin-top: 1mm; }
  .project-card > p:not(.project-category) { margin-bottom: .8mm; }
  .project-card .resource-link { font-size: 7.7pt; }

  .credentials-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 4mm;
  }

  .education-table { margin-top: 1.8mm; }
  .education-table tr { break-inside: avoid; }
  .education-table th, .education-table td { padding: 1.4mm 0 1.4mm 1.8mm; }
  .education-table th:first-child { padding-inline: 0 1mm; }
  .education-table thead th, .education-date { font-size: 7.2pt; }
  .education-table thead th { padding-block: 1mm; background: none; }
  .education-table thead th:first-child { padding-inline-start: 0; }
  .education-date { margin-bottom: .55mm; }
  .education-program { font-size: 8.7pt; }
  .education-table tbody td, .education-school, .education-specialization { font-size: 8pt; line-height: 1.35; }
  .education-school, .education-specialization { margin-top: .35mm; }

  .activities { margin-top: 3mm; }
  .activities > h2 { margin-bottom: 1mm; font-size: 11pt; }
  .activity-list li { padding-block: 1.4mm; break-inside: avoid; }
  .activity-list h3 { font-size: 9pt; }
  .activity-list p, .activity-list .text-link { font-size: 8.7pt; }
  .svoc-table { margin-top: 1mm; font-size: 8pt; }
  .svoc-table th, .svoc-table td { padding: 1mm 1.15mm; }
  .svoc-table th:first-child { width: 12mm; }
  .svoc-table thead th { background: none; }
  .svoc-table thead th, .svoc-table tbody th { font-size: 7.2pt; }
  .svoc-table .text-link { font-size: 7.7pt; }

  .publication h2 { font-size: 12pt; }
  .publication-meta { margin: 1.25mm 0; }
  .publication .resource-link { margin-top: 1mm; }

  .contact { color: var(--ink); }
  .contact p { color: var(--muted); }
  .button-inverse {
    min-height: 0;
    padding: 0;
    border: 0;
    color: var(--ink);
    font-size: 9pt;
    text-decoration: underline;
  }
}
