:root {
  color-scheme: light dark;
  --page: #f2f3f4;
  --paper: #ffffff;
  --ink: #17191c;
  --body-ink: #2d3136;
  --muted: #4f545a;
  --accent: #274f78;
  --accent-strong: #122f4c;
  --rule: #8ba2b7;
  --hairline: #cbd5de;
  --shell-border: #d7dadd;
  --shell-shadow: 0 8px 36px rgb(23 25 28 / 5%);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, "Aptos", "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e1013;
    --paper: #15181c;
    --ink: #e9e7e2;
    --body-ink: #c8cbcf;
    --muted: #9aa2ab;
    --accent: #8fb4d9;
    --accent-strong: #bcd6ef;
    --rule: #55708c;
    --hairline: #2d343c;
    --shell-border: #272c32;
    --shell-shadow: 0 8px 36px rgb(0 0 0 / 45%);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

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

::selection {
  color: var(--paper);
  background: var(--accent);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.17em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition:
    color 140ms ease,
    text-decoration-color 140ms ease;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

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

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.resume-shell {
  width: min(1440px, calc(100% - 48px));
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: clamp(40px, 5vw, 76px) clamp(36px, 5vw, 78px) 28px;
  background: var(--paper);
  border: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow);
}

.masthead,
.resume-grid,
footer {
  animation: settle 560ms cubic-bezier(0.22, 0.65, 0.3, 1) both;
}

.resume-grid {
  animation-delay: 90ms;
}

footer {
  animation-delay: 170ms;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(180px, 235px);
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
  padding-bottom: 13px;
  border-bottom: 1px solid var(--accent);
}

.identity h1,
h2 {
  font-family: var(--serif);
}

.identity h1 {
  margin: 0;
  font-size: clamp(52px, 6.2vw, 84px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.title {
  margin: 14px 0 10px;
  font-size: clamp(17px, 1.7vw, 23px);
  line-height: 1.25;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 0;
  color: var(--muted);
  font-style: normal;
  font-size: clamp(14px, 1.35vw, 18px);
}

.contact a {
  text-decoration: none;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.download:hover {
  color: var(--paper);
  background: var(--accent);
}

.download:active {
  transform: translateY(1px);
}

.download svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.7;
}

.portrait {
  height: 192px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--shell-border);
  outline: 1px solid var(--hairline);
  outline-offset: 3px;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 20%;
  filter: saturate(0.92) contrast(1.02);
  transform: scale(1.22);
  transform-origin: 66% 24%;
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(290px, 0.94fr);
  gap: clamp(44px, 5vw, 74px);
  padding-top: 14px;
}

.masthead > *,
.resume-grid > *,
.role-heading > * {
  min-width: 0;
}

.main-column {
  padding-right: clamp(8px, 1vw, 20px);
}

.side-column {
  padding-left: clamp(34px, 4vw, 58px);
  border-left: 1px solid var(--hairline);
}

section + section {
  margin-top: 24px;
}

h2 {
  margin: 0 0 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(29px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
}

.profile-copy {
  max-width: 69ch;
  margin: 0;
  padding: 2px 0 14px;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.55;
}

.organization {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

.role + .role {
  margin-top: 12px;
}

.role-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
}

.role h4,
.role p {
  margin: 0;
}

.role h4 {
  font-size: clamp(16px, 1.45vw, 19px);
}

.role time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.role p {
  max-width: 67ch;
  color: var(--body-ink);
  font-size: clamp(14px, 1.25vw, 17px);
}

.earlier {
  padding-top: 5px;
}

.earlier h2 {
  font-size: clamp(23px, 2.15vw, 30px);
}

.earlier ul,
.capabilities {
  padding: 0;
  list-style: none;
}

.earlier ul {
  margin: 8px 0 0;
}

.earlier li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  font-size: clamp(13px, 1.16vw, 16px);
}

.earlier time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.capabilities {
  margin: 15px 0 30px;
}

.capabilities li {
  display: inline;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.75;
}

.capabilities li:not(:last-child)::after {
  content: " · ";
  color: var(--accent);
}

.side-column section + section {
  margin-top: 24px;
}

.education {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}

.education p {
  margin: 0;
  font-size: clamp(15px, 1.35vw, 18px);
}

.education strong,
.education span {
  display: block;
}

.education strong {
  margin-bottom: 2px;
}

footer {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

footer a {
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 900px) {
  .resume-shell {
    width: min(100% - 24px, 760px);
    margin: 12px auto;
    padding: 32px 28px 24px;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) 138px;
    gap: 22px;
    align-items: start;
  }

  .identity {
    grid-column: 1;
  }

  .portrait {
    grid-column: 2;
    grid-row: 1;
    height: 150px;
  }

  .download {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    min-height: 48px;
    font-size: 16px;
  }

  .resume-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .main-column {
    padding-right: 0;
  }

  .side-column {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 36px;
    padding: 18px 0 0;
    border-top: 1px solid var(--hairline);
    border-left: 0;
  }

  .side-column section + section {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  body {
    background: var(--paper);
  }

  .resume-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 26px 20px 20px;
    border: 0;
    box-shadow: none;
  }

  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-rows: auto auto auto auto;
    column-gap: 18px;
    align-items: center;
  }

  .identity h1 {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(45px, 14vw, 66px);
  }

  .identity {
    display: contents;
  }

  .title {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 28ch;
    margin-top: 10px;
    font-size: 16px;
  }

  .contact {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    gap: 2px;
    font-size: 14px;
  }

  .contact > span[aria-hidden="true"] {
    display: none;
  }

  .portrait {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    width: 94px;
    height: 94px;
  }

  .download {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 18px;
    width: 100%;
  }

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

  h2 {
    font-size: 30px;
  }

  .role-heading,
  .earlier li {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .role time,
  .earlier time {
    font-size: 14px;
  }

  .role p {
    margin-top: 3px;
  }

  .side-column {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.45in;
  }

  :root {
    --page: #ffffff;
    --paper: #ffffff;
    --ink: #17191c;
    --body-ink: #2d3136;
    --muted: #4f545a;
    --accent: #274f78;
    --accent-strong: #122f4c;
    --rule: #8ba2b7;
    --hairline: #cbd5de;
    --shell-border: #d7dadd;
  }

  * {
    animation: none !important;
  }

  html,
  body {
    background: #fff;
  }

  body {
    font-size: 10pt;
  }

  .resume-shell {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .masthead {
    grid-template-columns: 1fr 1.45in;
    gap: 0.25in;
  }

  .identity h1 {
    font-size: 35pt;
  }

  .title {
    margin: 4pt 0;
    font-size: 12pt;
  }

  .contact {
    font-size: 9pt;
  }

  .portrait {
    grid-column: 2;
    height: 0.92in;
    outline: 0;
  }

  .download {
    display: none;
  }

  .resume-grid {
    grid-template-columns: 1.75fr 0.88fr;
    gap: 0.35in;
    padding-top: 8pt;
  }

  .side-column {
    padding-left: 0.25in;
  }

  h2 {
    padding-bottom: 3pt;
    font-size: 19pt;
  }

  .profile-copy,
  .role p,
  .organization,
  .role h4,
  .capabilities li,
  .education p {
    font-size: 9.3pt;
  }

  section + section,
  .role + .role {
    margin-top: 8pt;
  }

  .capabilities {
    margin: 6pt 0 12pt;
  }

  .capabilities li {
    line-height: 1.5;
  }

  footer {
    margin-top: 7pt;
    padding-top: 4pt;
  }
}
