@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/ibm-plex-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #17221c;
  --muted: #535e54;
  --paper: #f8f8f2;
  --white: #fffef9;
  --line: #d4dacf;
  --night: #14211d;
  --light: #f5f7ee;
  --mint: #c1f4a4;
  --green: #35634b;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 1rem/1.6 var(--sans); color: var(--ink); background: var(--paper); }
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #3e8f65; outline-offset: 5px; }
[id] { scroll-margin-top: 1.5rem; }
.wrap { width: min(75rem, calc(100% - 6rem)); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  padding: .65rem 1rem;
  background: var(--mint);
  color: var(--night);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.masthead, .hero, .site-footer { background: var(--night); color: var(--light); }
.masthead { border-bottom: 1px solid #35423c; }
.header-inner {
  min-height: 4.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  font: 1rem var(--mono);
  text-decoration: none;
  color: var(--light);
}
.wordmark span {
  width: .65rem;
  height: .65rem;
  border: 2px solid var(--mint);
  transform: rotate(45deg);
}
.header-inner nav, .footer-base nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.7vw, 2.4rem); }
.header-inner nav a, .footer-base nav a { color: #d5ded3; font-size: .9375rem; text-decoration: none; }
.header-inner nav a:hover, .footer-base nav a:hover { color: var(--mint); }
.header-cv {
  justify-self: end;
  border: 1px solid #697970;
  padding: .4rem .95rem;
  border-radius: 4px;
  font-size: .875rem;
  text-decoration: none;
}
.header-cv:hover { border-color: var(--mint); color: var(--mint); }

.hero-grid {
  min-height: 36rem;
  padding-block: 4.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: clamp(2rem, 5.3vw, 5rem);
  align-items: center;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  font: .875rem/1.4 var(--mono);
  letter-spacing: .045em;
  text-transform: uppercase;
  color: var(--green);
}
.accent-line { width: 1.32rem; height: 1px; background: currentColor; flex: none; }
.hero .eyebrow, .site-footer .eyebrow { color: var(--mint); }
.hero h1 {
  margin-block: 1.25rem 1.4rem;
  font-size: clamp(3rem, 6.8vw, 6.45rem);
  font-weight: 700;
  line-height: .97;
  letter-spacing: -.084em;
}
.hero h1 span { color: var(--mint); }
.hero-intro { max-width: 34rem; color: #d3dbd0; font-size: clamp(1.1rem, 1.75vw, 1.35rem); line-height: 1.55; }
.hero-intro strong { color: var(--light); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.05rem;
  padding: .62rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .18s, border-color .18s, color .18s;
}
.button-solid { background: var(--mint); color: var(--night); }
.button-solid:hover { background: #defbc9; }
.button-outline { border-color: #6a7970; color: var(--light); }
.button-outline:hover { border-color: var(--mint); color: var(--mint); }

.hero-portrait { width: 100%; max-width: 24.5rem; justify-self: end; }
.portrait-frame { position: relative; padding: .63rem; border: 1px solid #63796a; }
.portrait-frame::before, .portrait-frame::after {
  content: "";
  width: .9rem;
  height: .9rem;
  position: absolute;
  z-index: 1;
  background: var(--night);
}
.portrait-frame::before { top: -1px; left: -1px; border-top: 1px solid var(--mint); border-left: 1px solid var(--mint); }
.portrait-frame::after { right: -1px; bottom: -1px; border-right: 1px solid var(--mint); border-bottom: 1px solid var(--mint); }
.portrait-frame img { width: 100%; height: auto; aspect-ratio: 1 / 1.06; object-fit: cover; object-position: 50% 44%; }
.hero-portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .75rem;
  color: #c0cec0;
  font: .8125rem/1.45 var(--mono);
}

.section { padding-block: clamp(3.75rem, 7vw, 6.75rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 1.85rem; }
.section-heading > p { max-width: 19rem; color: var(--muted); }
.section h2, .contact-row h2 {
  margin-top: .55rem;
  font-size: clamp(2.55rem, 5vw, 4.6rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.075em;
}
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.work-card { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--white); }
.work-visual {
  min-height: 12rem;
  padding: 1.5rem 1rem;
  display: grid;
  align-items: center;
  justify-items: center;
  font: .75rem/1.1 var(--mono);
}
.scale-visual {
  color: #def4db;
  background-color: #213a30;
  background-image: radial-gradient(circle, #60816d80 1px, transparent 1px);
  background-size: 15px 15px;
}
.scale-diagram { width: min(100%, 23rem); }
.diagram-clients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; text-align: center; }
.diagram-clients span { border: 1px solid #577463; background: #243f33; border-radius: 3px; padding: .52rem .2rem; }
.diagram-joins { display: grid; grid-template-columns: repeat(3, 1fr); height: .8rem; }
.diagram-joins i { width: 1px; height: 100%; justify-self: center; background: #79a685; }
.diagram-api {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: #c1f4a4;
  color: var(--night);
  border-radius: 3px;
  padding: .72rem .3rem;
}
.node-mark { width: .47rem; height: .47rem; border: 1px solid currentColor; transform: rotate(45deg); }
.hotel-visual {
  color: #172b20;
  background-color: #dce9d7;
  background-image: radial-gradient(circle, #90a8918a 1px, transparent 1px);
  background-size: 15px 15px;
}
.hotel-diagram { width: min(100%, 22rem); }
.hotel-flow { display: grid; grid-template-columns: auto minmax(.8rem, 3rem) auto; justify-content: center; align-items: center; }
.hotel-flow span { background: #f5f9ee; border: 1px solid #a9bbaa; padding: .53rem .63rem; border-radius: 3px; }
.hotel-flow i { border-top: 1px solid #657c66; }
.hotel-panel { margin-top: .68rem; border: 1px solid #8da391; border-radius: 4px; background: #f7faf2; overflow: hidden; }
.hotel-panel-head { display: flex; align-items: center; gap: .45rem; padding: .6rem .65rem; color: #f2f8ec; background: #29493a; }
.hotel-panel-head span { width: .45rem; height: .45rem; border-radius: 50%; background: #bdecab; }
.hotel-panel-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; gap: .25rem; padding: .45rem; }
.hotel-panel-body span { padding: .54rem .12rem; background: #e6efe2; border-radius: 2px; }
.work-copy { padding: clamp(1.15rem, 2.65vw, 2rem); }
.work-meta { color: var(--green); font: .8125rem/1.5 var(--mono); }
.work-copy h3 { margin-block: .35rem .55rem; font-size: clamp(1.7rem, 3.05vw, 2.55rem); line-height: 1.08; letter-spacing: -.055em; }
.work-copy > p:not(.work-meta), .project-grid p:not(.work-meta) { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1.1rem 0 1.2rem; padding: 0; list-style: none; }
.tags li { border: 1px solid #dce3d7; border-radius: 3px; background: #f1f5ed; color: #314a39; padding: .26rem .43rem; font: .75rem/1.25 var(--mono); }
details { border-top: 1px solid var(--line); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .8rem;
  list-style: none;
  cursor: pointer;
  font-weight: 650;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--green); font: 1.25rem/1 var(--mono); }
details[open] summary::after { content: "−"; }
summary:hover { color: var(--green); }
details p { margin-top: .65rem; color: var(--muted); }

.projects { margin-top: 2.7rem; }
.projects > h3 { font-size: 1.55rem; letter-spacing: -.035em; margin-bottom: .8rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.project-grid article { border-top: 1px solid var(--line); padding: .85rem 1rem 0 0; }
.project-grid h4 { margin-block: .18rem .22rem; font-size: 1.25rem; }
.text-link { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .22em; font-weight: 650; }
.text-link:hover { color: var(--ink); text-decoration-thickness: 2px; }

.research-section { background: #e9efe5; }
.publication-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid #c3cec1; }
.publication-list li { display: grid; grid-template-columns: 5.5rem 1fr; align-items: start; gap: .85rem; padding: 1.05rem 0; border-top: 1px solid #c3cec1; }
.pub-year { color: var(--green); font: .875rem/1.7 var(--mono); }
.publication-list h3 { max-width: 55rem; font-size: clamp(1.035rem, 2vw, 1.35rem); font-weight: 650; line-height: 1.4; }
.publication-list a { text-decoration-color: #698072; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.publication-list a:hover { color: var(--green); }
.publication-list p { margin-top: .2rem; color: var(--muted); font-size: .9375rem; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 6.25vw, 6rem); align-items: center; }
.about-grid p:not(.eyebrow) { color: var(--muted); margin-top: 1rem; max-width: 37rem; }
.about-intro { font-size: 1.15rem; }
.toolkit { border: 1px solid var(--line); background: var(--white); border-radius: 7px; padding: clamp(1.15rem, 2.8vw, 2rem); }
.toolkit h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.03em; }
.toolkit dl { margin-block: .65rem 0; }
.toolkit dl div { padding-block: .63rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 7.3rem 1fr; gap: .5rem; }
.toolkit dl div:last-child { padding-bottom: 0; }
.toolkit dt { font-size: .875rem; font-weight: 650; }
.toolkit dd { margin: 0; color: var(--muted); font-size: .9375rem; }

.site-footer { padding-top: clamp(3rem, 6.5vw, 5.5rem); }
.contact-row { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; padding-bottom: 2.4rem; }
.contact-row p:not(.eyebrow) { margin-top: .8rem; color: #d3dbd0; }
.footer-base {
  padding-block: 1.2rem;
  border-top: 1px solid #3f5148;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .9rem 1.25rem;
}
.footer-base > span { color: #c0cec0; font-size: .8125rem; }

.resume-page { background: var(--paper); }
.resume-layout { max-width: 55rem; padding-block: 3.3rem 5rem; }
.resume-heading { border-bottom: 1px solid var(--line); padding-bottom: 1.4rem; }
.resume-heading h1 { margin-block: .55rem .3rem; font-size: clamp(2.65rem, 6vw, 4.7rem); line-height: 1; letter-spacing: -.065em; }
.resume-heading p { margin-top: .55rem; }
.resume-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.1rem; margin-top: 1.05rem; }
.resume-actions .button-solid { background: var(--night); color: var(--light); }
.resume-actions .button-solid:hover { background: var(--green); }
.resume-section { margin-top: 1.8rem; }
.resume-section h2 { font-size: 1.55rem; letter-spacing: -.035em; margin-bottom: .35rem; }
.resume-section h3 { font-size: 1.05rem; line-height: 1.4; }
.resume-section article + article { margin-top: 1.05rem; }
.resume-section ul { padding-left: 1.25rem; margin-block: .35rem 0; }
.resume-section li + li { margin-top: .2rem; }
.resume-dates { font-family: var(--mono); font-size: .8125rem; color: var(--green); }

@media (max-width: 62rem) {
  .wrap { width: calc(100% - 4rem); }
  .hero-grid { gap: 2.2rem; min-height: 31rem; padding-block: 3.65rem; }
  .hero h1 { font-size: clamp(3rem, 7.45vw, 5.15rem); }
}

@media (max-width: 46rem) {
  .wrap { width: calc(100% - 2.5rem); }
  .header-inner { min-height: 4rem; gap: .8rem; grid-template-columns: 1fr auto; padding-block: .85rem .55rem; }
  .header-inner nav { grid-row: 2; grid-column: 1 / -1; gap: 1.25rem; overflow-x: auto; }
  .header-inner nav a { padding-block: .22rem; }
  .header-cv { grid-row: 1; grid-column: 2; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.15rem; min-height: 0; padding-block: 2.85rem 2.75rem; }
  .hero h1 { font-size: clamp(2.8rem, 11.6vw, 5rem); }
  .hero-portrait { justify-self: start; max-width: 24rem; }
  .portrait-frame img { aspect-ratio: 1.18; object-position: 50% 42%; }
  .section-heading { display: grid; gap: .6rem; margin-bottom: 1.2rem; }
  .work-grid, .about-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .publication-list li { grid-template-columns: 2.7rem 1fr; gap: .5rem; }
  .contact-row { align-items: start; flex-direction: column; }
  .footer-base nav { gap: 1rem; }
}

@media (max-width: 24rem) {
  .wrap { width: calc(100% - 2rem); }
  .hero h1 { font-size: clamp(2.35rem, 11.3vw, 2.7rem); }
  .hero-portrait figcaption { font-size: .75rem; }
  .toolkit dl div { grid-template-columns: 1fr; gap: .15rem; }
}

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

.resume-masthead { grid-template-columns: 1fr auto; }

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

@media print {
  .resume-page { background: #fff; color: #17221c; font: 10.5pt/1.38 Arial, sans-serif; }
  .resume-page .masthead, .resume-page .skip-link, .resume-actions, .resume-heading .eyebrow { display: none; }
  .resume-layout { width: 100%; max-width: none; padding: 0; }
  .resume-heading { padding-bottom: 9pt; }
  .resume-heading h1 { font-size: 28pt; margin: 0 0 5pt; }
  .resume-heading p { margin-top: 3pt; }
  .resume-section { margin-top: 12pt; }
  .resume-section h2 { margin-bottom: 4pt; font-size: 15pt; break-after: avoid; }
  .resume-section h3 { font-size: 11pt; }
  .resume-section article { break-inside: avoid; }
  .resume-section article + article { margin-top: 8pt; }
  .resume-section li + li { margin-top: 3pt; }
  .resume-dates { font: 9pt/1.3 Arial, sans-serif; }
  .resume-print-page { break-before: page; margin-top: 0; }
}
