:root {
  color-scheme: light;
  --paper: #f6f6f1;
  --paper-deep: #e9e8e1;
  --ink: #080808;
  --muted: #65655f;
  --line: #c9c9c1;
  --signal: #ff5f3b;
  --white: #fff;
  --page-width: 1400px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  touch-action: manipulation;
}

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

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

button,
summary {
  font: inherit;
  touch-action: manipulation;
}

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

ul {
  margin: 0;
  padding-left: 1.2rem;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(7rem, 14vw, 13rem);
  line-height: 0.78;
}

h2 {
  font-size: clamp(4rem, 7vw, 7rem);
  line-height: 0.82;
}

h3,
h4 {
  line-height: 1.22;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px var(--paper);
}

main[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}

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

.page {
  width: min(var(--page-width), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.nav-row {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.wordmark {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -0.08em;
  text-decoration: none;
}

.wordmark span {
  color: var(--signal);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 2.3vw, 36px);
}

.desktop-nav a,
.mobile-nav a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  text-decoration: none;
}

.desktop-nav .nav-resume {
  min-height: 46px;
  padding-inline: 18px;
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
}

.desktop-nav .nav-resume:hover {
  color: var(--ink);
  background: var(--signal);
}

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  width: min(var(--page-width), calc(100% - 40px));
  min-height: clamp(700px, calc(100svh - 86px), 860px);
  margin-inline: auto;
  padding: clamp(24px, 3vw, 42px) clamp(22px, 3vw, 48px) 0;
  overflow: hidden;
  background: var(--signal);
}

.kicker,
.section-heading > p {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero > .kicker {
  grid-column: 1 / 8;
  grid-row: 1;
}

.hero h1 {
  z-index: 1;
  grid-column: 1 / 9;
  grid-row: 2;
  align-self: start;
  margin-top: clamp(24px, 3vw, 46px);
}

.hero h1 span {
  display: block;
}

.hero-summary {
  z-index: 2;
  grid-column: 1 / 6;
  grid-row: 3;
  align-self: end;
  max-width: 560px;
  padding: 18px 0 38px;
  border-top: 4px solid var(--ink);
}

.intro {
  font-size: clamp(0.96rem, 1.3vw, 1.1rem);
  font-weight: 720;
  line-height: 1.35;
}

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

.hero-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 800;
}

.button {
  padding-inline: 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
}

.button:hover {
  color: var(--ink);
  background: transparent;
}

.portrait {
  z-index: 3;
  grid-column: 9 / 13;
  grid-row: 2 / 4;
  align-self: end;
  justify-self: end;
  width: min(29vw, 390px);
}

.portrait img {
  width: 100%;
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  filter: grayscale(1) contrast(1.08);
  object-fit: cover;
}

.portrait figcaption {
  display: inline-block;
  padding: 8px 11px;
  color: var(--white);
  background: var(--ink);
  font-size: 0.75rem;
  font-weight: 750;
}

.facts-wrap {
  color: var(--white);
  background: var(--ink);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-facts > div {
  min-width: 0;
  padding: 30px clamp(20px, 3vw, 42px);
  border-left: 1px solid #3b3b3b;
}

.quick-facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.quick-facts dt {
  margin-bottom: 8px;
  color: var(--signal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.quick-facts dd {
  max-width: 350px;
  font-size: 0.9rem;
}

.section {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: clamp(50px, 7vw, 110px);
  padding-block: clamp(96px, 11vw, 168px);
  border-top: 1px solid var(--ink);
}

.section-heading h2 {
  max-width: 8ch;
  margin-top: 18px;
}

.section-heading > p {
  color: var(--muted);
}

.work-list,
.roles {
  min-width: 0;
}

.work-list {
  display: grid;
  gap: clamp(80px, 11vw, 160px);
}

.work-item {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  min-height: clamp(430px, 43vw, 590px);
  padding: clamp(24px, 4vw, 56px);
  color: var(--white);
  background: var(--ink);
}

.work-item:nth-child(2) {
  width: 88%;
  margin-left: auto;
  color: var(--ink);
  border: 2px solid var(--ink);
  background: var(--paper);
}

.work-item:nth-child(3) {
  width: 94%;
  color: var(--ink);
  background: var(--signal);
}

.work-item:nth-child(4) {
  width: 84%;
  margin-left: auto;
}

.work-item > span {
  grid-column: 1 / 3;
  grid-row: 1;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.work-item h3 {
  grid-column: 1 / 12;
  grid-row: 2;
  align-self: center;
  max-width: 10ch;
  font-family: var(--display);
  font-size: clamp(3.8rem, 7vw, 7.8rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.82;
  text-transform: uppercase;
}

.work-item > div {
  grid-column: 7 / 13;
  grid-row: 3;
  align-self: end;
}

.work-item p {
  font-weight: 650;
}

.work-item small {
  display: block;
  margin-top: 16px;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-transform: uppercase;
}

.private-note {
  grid-column: 2;
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.82rem;
}

#experience {
  width: 100%;
  max-width: none;
  padding-inline: max(20px, calc((100vw - var(--page-width)) / 2));
  color: var(--white);
  border-top: 0;
  background: var(--ink);
}

#experience .section-heading > p,
#experience .company {
  color: var(--signal);
}

.role {
  display: grid;
  grid-template-columns: minmax(150px, 0.3fr) minmax(0, 1fr);
  gap: 30px;
  padding-block: 42px;
  border-top: 1px solid #4a4a4a;
}

.role:first-child {
  padding-top: 0;
  border-top: 0;
}

.role-meta {
  color: #b8b8b2;
  font-size: 0.8rem;
}

.role h3 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  letter-spacing: -0.035em;
}

.company {
  margin: 6px 0 20px;
  font-weight: 750;
}

.role ul {
  margin-top: 20px;
}

.role li + li {
  margin-top: 8px;
}

.tool-list {
  display: grid;
}

.tool-list > div {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 32px;
  align-items: baseline;
  padding-block: 25px;
  border-top: 1px solid var(--line);
}

.tool-list > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.tool-list dt {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-list dd {
  color: #383834;
}

.background-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 7vw, 90px);
}

.background-grid > div {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.background-grid h3 {
  margin-bottom: 28px;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.education-item + .education-item {
  margin-top: 26px;
}

.education-item h4 {
  font-size: 0.96rem;
}

.education-item p,
.credential-list {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.credential-list li + li {
  margin-top: 8px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.55fr);
  gap: clamp(48px, 9vw, 140px);
  width: min(var(--page-width), calc(100% - 40px));
  margin-top: 0;
  padding: clamp(72px, 10vw, 140px) clamp(24px, 4vw, 60px);
  border-top: 0;
  background: var(--signal);
}

.contact h2 {
  margin-top: 18px;
}

.contact > div > p:last-child {
  max-width: 540px;
  margin-top: 24px;
  font-weight: 650;
}

.contact address {
  display: grid;
  align-content: start;
  font-style: normal;
}

.contact address a {
  display: flex;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid rgba(8, 8, 8, 0.42);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

/* Resume */

.resume-page {
  background: var(--paper-deep);
  font-size: 10.5pt;
  line-height: 1.48;
}

.resume-actions {
  display: flex;
  width: min(210mm, calc(100% - 32px));
  gap: 8px;
  margin: 18px auto;
}

.resume-actions a,
.resume-actions button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #aaa49a;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.resume-actions button {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.resume-sheet {
  width: min(210mm, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 14mm;
  background: var(--white);
  box-shadow: 0 18px 55px rgba(35, 38, 45, 0.14);
}

.resume-header {
  padding-bottom: 16px;
  border-bottom: 3px solid var(--signal);
}

.resume-header h1 {
  margin-bottom: 4px;
  font-family: var(--sans);
  font-size: 27pt;
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: none;
}

.resume-role {
  margin-bottom: 9px;
  color: #4f4c47;
  font-size: 13pt;
  font-weight: 700;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: #5d5952;
  font-size: 9.3pt;
}

.resume-main {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.resume-main section {
  break-inside: avoid;
}

.resume-main h2 {
  margin-bottom: 9px;
  padding-bottom: 4px;
  border-bottom: 1px solid #d6d0c5;
  font-family: var(--sans);
  font-size: 11.5pt;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resume-main h3 {
  margin: 0 0 2px;
  font-size: 10.8pt;
}

.resume-main p {
  margin-bottom: 7px;
}

.resume-summary {
  max-width: 170mm;
  color: #3f3c37;
}

.resume-job + .resume-job {
  margin-top: 13px;
}

.resume-meta {
  margin-bottom: 5px;
  color: #66615a;
  font-size: 9pt;
  font-weight: 650;
}

.resume-main ul {
  margin: 5px 0 0;
  padding-left: 18px;
}

.resume-main li + li {
  margin-top: 3px;
}

.resume-skills,
.resume-education {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.resume-skills p {
  margin: 0;
}

.resume-credentials {
  columns: 2;
  column-gap: 28px;
}

.resume-credentials li {
  break-inside: avoid;
  margin-bottom: 4px;
}

.resume-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #d6d0c5;
  color: #6c675f;
  font-size: 8.5pt;
}

/* 404 */

.not-found {
  display: grid;
  width: min(820px, calc(100% - 40px));
  min-height: 100svh;
  align-content: center;
  margin-inline: auto;
  padding: 64px clamp(24px, 5vw, 72px);
  background: var(--signal);
}

.not-found h1 {
  margin-top: 18px;
}

.not-found > p:not(.kicker) {
  max-width: 560px;
  margin-top: 24px;
  font-size: 1.12rem;
  font-weight: 650;
}

.not-found nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 32px;
}

.not-found nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 800;
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .hero h1 {
    grid-column: 1 / 9;
  }

  .hero-summary {
    grid-column: 1 / 7;
  }

  .portrait {
    grid-column: 7 / 11;
    width: min(32vw, 330px);
  }

  .section {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .section-heading h2 {
    max-width: 10ch;
  }

  .private-note {
    grid-column: auto;
  }

  #experience {
    padding-inline: 20px;
  }

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

@media (max-width: 700px) {
  html {
    scroll-padding-top: 76px;
  }

  .page {
    width: min(100% - 32px, var(--page-width));
  }

  h2 {
    font-size: clamp(3.25rem, 18vw, 4.5rem);
  }

  .nav-row {
    min-height: 74px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    position: relative;
    display: block;
  }

  .mobile-nav summary {
    display: inline-flex;
    min-width: 58px;
    min-height: 44px;
    align-items: center;
    justify-content: flex-end;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav summary::after {
    content: "+";
    width: 16px;
    margin-left: 7px;
  }

  .mobile-nav[open] summary::after {
    content: "−";
  }

  .mobile-nav nav {
    position: absolute;
    top: 51px;
    right: 0;
    display: grid;
    width: min(280px, calc(100vw - 32px));
    padding: 12px 18px;
    color: var(--white);
    border: 3px solid var(--signal);
    background: var(--ink);
  }

  .mobile-nav:not([open]) nav {
    display: none;
  }

  .mobile-nav nav a {
    justify-content: flex-start;
    min-height: 50px;
    border-bottom: 1px solid #454545;
  }

  .mobile-nav nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    width: 100%;
    min-height: calc(100svh - 74px);
    padding: 20px 16px 0;
  }

  .hero > .kicker,
  .hero h1,
  .hero-summary,
  .portrait {
    grid-column: 1;
  }

  .hero > .kicker {
    grid-row: 1;
  }

  .hero h1 {
    grid-row: 2;
    margin-top: 22px;
    font-size: clamp(4.4rem, 23vw, 6.2rem);
  }

  .hero-summary {
    grid-row: 4;
    align-self: start;
    max-width: 520px;
    margin-top: 30px;
    padding-bottom: 32px;
  }

  .portrait {
    grid-row: 3;
    width: min(76vw, 300px);
    margin-top: 34px;
  }

  .quick-facts {
    grid-template-columns: 1fr;
  }

  .quick-facts > div,
  .quick-facts > div:first-child {
    padding: 22px 0;
    border-bottom: 1px solid #3b3b3b;
    border-left: 0;
  }

  .quick-facts > div:last-child {
    border-bottom: 0;
  }

  .section {
    gap: 48px;
    padding-block: 92px;
  }

  .work-list {
    gap: 92px;
  }

  .work-item,
  .work-item:nth-child(2),
  .work-item:nth-child(3),
  .work-item:nth-child(4) {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    width: 100%;
    min-height: 440px;
    margin-left: 0;
    padding: 26px 22px;
  }

  .work-item > span,
  .work-item h3,
  .work-item > div {
    grid-column: 1;
  }

  .work-item h3 {
    max-width: 9ch;
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .work-item:first-child h3 {
    font-size: clamp(2.35rem, 11vw, 4.4rem);
  }

  .work-item > div {
    max-width: 500px;
  }

  .role,
  .tool-list > div {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .background-grid,
  .resume-skills,
  .resume-education {
    grid-template-columns: 1fr;
  }

  .contact {
    width: 100%;
    padding-inline: 16px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-block: 28px;
  }

  .resume-sheet {
    padding: 24px;
  }

  .resume-credentials {
    columns: 1;
  }
}

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

@media print {
  body.resume-page {
    color: #111;
    background: #fff;
    font-size: 9.6pt;
  }

  .resume-actions {
    display: none;
  }

  .resume-sheet {
    width: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .resume-main {
    gap: 14px;
    padding-top: 14px;
  }

  .resume-job + .resume-job {
    margin-top: 9px;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
