:root {
  color-scheme: light;
  --canvas: #eeede8;
  --paper: #fbfaf5;
  --ink: #212126;
  --muted: #545365;
  --navy: #26263d;
  --link: #293f8f;
  --visited: #663c71;
  --rule: #cac9c8;
  --gutter: clamp(1.2rem, 5vw, 3.5rem);
  --serif: Georgia, "Times New Roman", serif;
  --mono: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.65 Verdana, Geneva, sans-serif;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:visited {
  color: var(--visited);
}

a:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.07;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  letter-spacing: -0.048em;
}

h2 {
  font-size: clamp(1.8rem, 3.9vw, 2.65rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.015em;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-180%);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--navy);
  background: var(--paper);
}

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

.page {
  width: min(68rem, calc(100% - 3rem));
  margin: 2rem auto;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.masthead,
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding: 0.75rem var(--gutter);
  font: 0.94rem/1.5 var(--mono);
}

.masthead {
  background: var(--navy);
  color: var(--paper);
}

.masthead nav,
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.masthead a,
.masthead a:visited {
  color: inherit;
}

.masthead .site-name {
  font-weight: bold;
  text-decoration: none;
}

.masthead .site-name:hover {
  text-decoration: underline;
}

.masthead nav [aria-current="page"] {
  font-weight: bold;
}

main {
  padding-inline: var(--gutter);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.29fr);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2.5rem, 7vw, 5.1rem) clamp(2.5rem, 6vw, 4.5rem);
}

.intro p {
  max-width: 35rem;
  margin-top: 1.2rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.65;
}

.elsewhere {
  border-left: 1px solid var(--rule);
  padding-left: 1.4rem;
}

.label {
  color: var(--muted);
  font: 0.9rem/1.45 var(--mono);
}

.elsewhere h2 {
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.elsewhere ul,
.link-list {
  padding: 0;
  list-style: none;
}

.elsewhere ul {
  margin-top: 0.35rem;
  font-size: 0.94rem;
}

.projects {
  scroll-margin-top: 1rem;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
  padding-block: 0.85rem 1.05rem;
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--rule);
}

.section-heading > a,
.project p + a {
  font-size: 0.94rem;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.5rem 2rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

.project p:not(.label) {
  max-width: 38rem;
  margin-top: 0.45rem;
}

.project p + a {
  display: inline-block;
  margin-top: 0.35rem;
}

.project-tech {
  padding-top: 0.3rem;
  text-align: right;
}

.featured {
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 36%);
  align-items: center;
  column-gap: clamp(1.5rem, 5vw, 3.75rem);
}

.featured .label {
  margin-bottom: 0.45rem;
}

.featured img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--navy);
}

figcaption {
  margin-top: 0.3rem;
  color: var(--muted);
  font: 0.81rem/1.4 var(--mono);
}

.resume-note {
  padding-block: 2rem 2.6rem;
}

.resume-note p,
.link-list {
  margin-top: 0.6rem;
}

.footer {
  border-top: 1px solid var(--rule);
  background: #f0efe9;
}

.resume-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  padding-block: clamp(2rem, 6vw, 4rem) 2rem;
}

.resume-header h1 {
  margin-block: 0.25rem 0.6rem;
}

.pdf-link {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid currentColor;
  font: 0.94rem/1.5 var(--mono);
}

.resume-section {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 3.1fr);
  align-items: baseline;
  gap: 0.65rem 1.75rem;
  padding-block: 1.2rem;
  border-top: 1px solid var(--rule);
}

.resume-section h2 {
  font-size: 1.52rem;
}

.resume-section dl > div + div {
  margin-top: 0.75rem;
}

.resume-section dt {
  font-weight: bold;
}

.resume-section dd + dd {
  margin-top: 0.12rem;
}

.references {
  padding-block: 0.4rem 2.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

@media screen and (max-width: 42rem) {
  .page {
    width: 100%;
    margin: 0;
    border-inline: 0;
  }

  .intro,
  .project,
  .featured,
  .resume-section {
    grid-template-columns: 1fr;
  }

  .elsewhere {
    border-left: 0;
    padding-left: 0;
  }

  .elsewhere ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
  }

  .featured {
    row-gap: 0.9rem;
  }

  .featured figure {
    width: min(100%, 27rem);
  }

  .project-tech {
    padding-top: 0;
    text-align: left;
  }
}

@page {
  size: letter;
  margin: 0.5in 0.6in;
}

@media print {
  .resume-page {
    background: white;
    color: #171717;
    font: 10.5pt/1.28 Arial, sans-serif;
  }

  .resume-page .page,
  .resume-page main {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }

  .resume-page .masthead,
  .resume-page .footer,
  .resume-page .skip-link,
  .resume-page .pdf-link,
  .resume-header .label {
    display: none;
  }

  .resume-header {
    display: block;
    padding: 0 0 11pt;
  }

  .resume-header h1 {
    margin-block: 0 3pt;
    font-size: 30pt;
  }

  .resume-contact a {
    color: inherit;
    text-decoration: none;
  }

  .resume-section {
    display: block;
    padding-block: 6pt;
    break-inside: avoid;
    border-color: #aaa;
  }

  .resume-section h2 {
    margin-bottom: 3pt;
    font-size: 14pt;
  }

  .resume-section dl > div + div {
    margin-top: 3pt;
  }

  .resume-section dd + dd {
    margin-top: 0;
  }

  .references {
    padding: 4pt 0 0;
    font-size: 9.5pt;
  }
}
