/* Archivo by Omnibus-Type, SIL Open Font License 1.1. One variable file per script range. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --paper: #f3f0e8;
  --ink: #121210;
  --soft: #6a665e;
  --line: rgba(18, 18, 16, 0.2);
  --red: #d42b1e;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121210;
    --ink: #ece8de;
    --soft: #9c978c;
    --line: rgba(236, 232, 222, 0.22);
    --red: #ff5a3c;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: var(--red);
  color: #fff;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s;
}

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

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

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

.fit {
  container-type: inline-size;
}

/* Small capitals used for every label on the page */

.label,
.bar,
.when,
.tags,
.title p,
.cols h3,
.apps em,
.colophon {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* Condensed display cut of the same typeface */

.name,
.title h2,
.stats strong,
.dark h2,
.jobs-list li::before,
.mail {
  font-weight: 800;
  font-stretch: 62%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Top bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.bar .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 44px;
}

.bar a {
  text-decoration: none;
}

.bar nav {
  display: none;
  gap: 28px;
  margin-inline: auto;
}

@media (min-width: 760px) {
  .bar nav {
    display: flex;
  }
}

.bar nav a.on {
  color: var(--red);
}

.bar p {
  margin-left: auto;
  color: var(--soft);
}

@media (min-width: 760px) {
  .bar nav + p {
    margin-left: 0;
  }
}

/* Hero: the name fills the measure */

.hero {
  padding-top: clamp(20px, 3.4vw, 44px);
}

.name {
  overflow: hidden;
  font-size: 17.2cqw;
  line-height: 0.82;
  white-space: nowrap;
}

.name br {
  display: none;
}

@media (max-width: 640px) {
  .name {
    font-size: 28.2cqw;
  }

  .narrow .name {
    font-size: 30.4cqw;
  }

  .name br {
    display: inline;
  }
}

.name span {
  display: block;
  animation: rise 1.1s var(--ease) both;
}

@keyframes rise {
  from {
    transform: translateY(105%);
  }
}

.lede {
  display: grid;
  gap: 28px 24px;
  margin-top: clamp(14px, 2vw, 26px);
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

@media (min-width: 900px) {
  .lede {
    grid-template-columns: 3fr 6fr 3fr;
  }
}

.who strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.who span {
  display: block;
  margin-top: 4px;
  color: var(--soft);
}

.summary {
  max-width: 34em;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  line-height: 1.36;
  letter-spacing: -0.01em;
}

.contact li {
  border-top: 1px solid var(--line);
}

.contact li:first-child {
  border-top: 0;
}

.contact a,
.contact button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 7px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, padding 0.3s var(--ease);
}

.contact a::after,
.contact button::after {
  content: "↗";
}

.contact a:hover,
.contact button:hover {
  padding-left: 8px;
  color: var(--red);
}

.lede .contact li:first-child a {
  padding-top: 0;
}

/* Numbers */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.stats li {
  padding: 16px 16px 20px 0;
}

.stats li:nth-child(even) {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.stats li:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats li:nth-child(n) {
    padding-left: 20px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .stats li:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

.stats strong {
  display: block;
  font-size: clamp(3.4rem, 8.4vw, 7.4rem);
  line-height: 0.9;
}

.stats s {
  margin-right: 0.12em;
  color: var(--soft);
  font-size: 0.42em;
  font-weight: 500;
  text-decoration-color: var(--red);
  text-decoration-thickness: 0.09em;
}

.stats span {
  display: block;
  max-width: 16em;
  margin-top: 10px;
  color: var(--soft);
  line-height: 1.35;
}

/* Section heads */

section {
  padding-top: clamp(72px, 10vw, 136px);
  scroll-margin-top: 30px;
}

.title {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 20px;
}

.title::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--ink);
  transform-origin: 0 50%;
  transition: transform 1.2s var(--ease);
}

.js .title:not(.in)::before {
  transform: scaleX(0);
}

.title h2 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 0.86;
}

.title p {
  padding-bottom: 4px;
  color: var(--soft);
  text-align: right;
}

/* Experience ledger */

.row {
  display: grid;
  gap: 8px 24px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
  .row {
    grid-template-columns: 2fr 4fr 6fr;
  }
}

.when {
  padding-top: 5px;
  color: var(--soft);
  transition: color 0.2s;
}

.row:hover .when {
  color: var(--red);
}

.row h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  transition: transform 0.4s var(--ease);
}

.row:hover h3 {
  transform: translateX(6px);
}

.at {
  margin-top: 6px;
  color: var(--soft);
}

.at b {
  color: var(--ink);
  font-weight: 600;
}

.row ul {
  padding-left: 1.1em;
  list-style: square;
}

.row li {
  margin-bottom: 6px;
  padding-left: 2px;
}

.row li::marker {
  color: var(--red);
  font-size: 0.8em;
}

.tags {
  margin-top: 12px;
  color: var(--soft);
}

/* Apps: a ruled table of cells that invert on hover */

.apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

@media (min-width: 1000px) {
  .apps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.apps li {
  background: var(--paper);
}

.apps a {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 230px;
  padding: clamp(14px, 2vw, 22px);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.apps a:hover {
  background: var(--ink);
  color: var(--paper);
}

.apps img {
  width: 56px;
  height: 56px;
  margin-bottom: auto;
  border-radius: 22.5%;
}

.apps strong {
  margin-top: 28px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.apps span {
  margin-top: 6px;
  color: var(--soft);
  font-size: 0.94rem;
  line-height: 1.4;
}

.apps a:hover span {
  color: inherit;
  opacity: 0.7;
}

.apps em {
  margin-top: 16px;
  font-style: normal;
}

.note {
  margin-top: 16px;
  color: var(--soft);
}

/* Plain columns: skills and background */

.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 24px;
}

@media (min-width: 900px) {
  .cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cols.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cols.three {
    grid-template-columns: 1fr;
  }
}

.cols h3 {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  color: var(--soft);
}

.cols li {
  padding: 4px 0;
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.3;
}

.cols small {
  display: block;
  padding-top: 2px;
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 400;
}

.cols.three li {
  padding: 8px 0;
}

/* Inverted block */

.dark {
  margin-top: clamp(72px, 10vw, 136px);
  padding-block: clamp(52px, 8vw, 112px);
  background: var(--ink);
  color: var(--paper);
}

.dark .wrap {
  display: grid;
  gap: 40px 24px;
}

@media (min-width: 900px) {
  .dark .wrap {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.dark h2 {
  font-size: clamp(3rem, 9vw, 7.4rem);
  line-height: 0.84;
}

.dark h2 em {
  color: var(--red);
  font-style: normal;
}

.dark p {
  max-width: 30em;
  margin-top: 22px;
  font-size: 1.12rem;
  opacity: 0.75;
}

.jobs-list {
  counter-reset: n;
}

.jobs-list li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid color-mix(in srgb, var(--paper) 28%, transparent);
  counter-increment: n;
}

.jobs-list li::before {
  content: counter(n);
  grid-row: span 2;
  color: var(--red);
  font-size: 2.6rem;
  line-height: 0.9;
}

.jobs-list strong {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.jobs-list span {
  opacity: 0.7;
}

/* Contact: the address fills the measure */

.mail {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  font-size: 13.2cqw;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}

.outro .contact {
  display: grid;
  gap: 0 24px;
  margin-top: 18px;
  border-top: 2px solid var(--ink);
}

@media (min-width: 760px) {
  .outro .contact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .outro .contact li {
    border-top: 0;
  }
}

.outro .contact a,
.outro .contact button {
  padding: 12px 0;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: clamp(56px, 8vw, 104px);
  padding: 14px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--soft);
}

/* Support page */

@media (min-width: 641px) {
  .narrow .name {
    font-size: 21.2cqw;
  }
}

.faq .row {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .faq .row {
    grid-template-columns: 5fr 7fr;
  }
}

.faq h3 {
  font-size: 1.3rem;
}

/* Blocks fade in as they enter (only when the script runs) */

.js [data-in] {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.js [data-in].in {
  opacity: 1;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-in] {
    opacity: 1;
  }

  .js .title:not(.in)::before {
    transform: none;
  }
}

/* Print: the page is already a resume, so only trim it */

@media print {
  :root {
    --paper: #fff;
    --ink: #000;
    --soft: #444;
    --line: #bbb;
    --red: #000;
  }

  body {
    font-size: 9.5pt;
  }

  .bar,
  .contact button,
  .apps em,
  .outro .contact,
  .note a {
    display: none;
  }

  .wrap {
    max-width: none;
    padding-inline: 0;
  }

  .name,
  .narrow .name {
    font-size: 30pt;
  }

  .name br {
    display: none;
  }

  .mail {
    font-size: 16pt;
  }

  .stats strong {
    font-size: 24pt;
  }

  .title h2,
  .dark h2 {
    font-size: 18pt;
  }

  section,
  .stats,
  .dark,
  .colophon {
    margin-top: 0;
    padding-top: 16pt;
  }

  .dark {
    padding-bottom: 0;
    background: none;
    color: #000;
  }

  .row {
    grid-template-columns: 2fr 4fr 6fr;
    padding: 6pt 0;
    break-inside: avoid;
  }

  .apps {
    grid-template-columns: repeat(4, 1fr);
  }

  .apps a {
    min-height: 0;
  }

  .apps img {
    width: 24pt;
    height: 24pt;
  }

  .apps strong {
    margin-top: 6pt;
    font-size: 10pt;
  }

  .js [data-in] {
    opacity: 1 !important;
  }

  .js .title:not(.in)::before {
    transform: none !important;
  }
}
