:root {
  color-scheme: light;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: #262625;
  background: #fff;
  --muted: #545451;
  --rule: #e4e4e2;
}

* { box-sizing: border-box; }
body { margin: 0; container-type: inline-size; }
main { width: min(72rem, 100%); margin: auto; padding: 0 clamp(1.25rem, 6vw, 5rem); }

a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  min-height: 2.875rem;
  padding: .65rem 1.1rem;
  border: 1px solid #d9d9d7;
  border-radius: .35rem;
  background: #fff;
  color: #292928;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
a:hover { background: #f1f1ef; border-color: #ababaa; }
a:focus-visible { outline: 3px solid #2666b0; outline-offset: 4px; }
.new-tab-icon { flex: none; width: .9em; height: .9em; filter: invert(1); }
.profile-links, .work-links { display: flex; flex-wrap: wrap; gap: .65rem; }

.intro {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
}

.intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50cqw);
  background: linear-gradient(165deg, #fff 28%, #f5f5f4);
  clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%);
}
h1 {
  position: relative;
  overflow: hidden;
  width: min(100%, 20rem);
  aspect-ratio: 4.1;
  margin: 0 0 1.65rem;
  mix-blend-mode: multiply;
}
h1 img { width: 203%; height: auto; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -52%); }
.role {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.8rem, 5.2vw, 4.5rem);
  font-weight: 650;
  line-height: 1.03;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.bio, article > p:not(.context) { color: var(--muted); line-height: 1.65; text-wrap: pretty; }
.bio { max-width: 50ch; margin: 1.4rem 0; font-size: 1.08rem; }
.profile-links a:first-child { color: white; background: #30302f; border-color: #30302f; }
.profile-links a:first-child:hover { background: #151514; }
.profile-links a:first-child .new-tab-icon { filter: none; }
.portrait {
  display: block;
  width: 100%;
  height: auto;
  padding: clamp(.4rem, 1vw, .8rem);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: .85rem;
  box-shadow: 0 .8rem 2.6rem rgba(26, 28, 29, .09);
}

.work, #resume { padding: clamp(2.25rem, 5vw, 4rem) 0; }
#resume { border-top: 1px solid var(--rule); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 620; line-height: 1.14; letter-spacing: -.045em; margin: 0; }
.entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: .75rem;
}
article { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.25rem, 3vw, 2.25rem); }
article + article { border-left: 1px solid var(--rule); }
.context { color: var(--muted); margin: 0; font-size: .9rem; font-weight: 600; }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.04em; line-height: 1.15; margin: .7rem 0 0; }
article > p:not(.context) { margin: .9rem 0 1.5rem; }
article > a, .work-links { margin-top: auto; }
article > a { max-width: 100%; white-space: normal; text-align: center; }
.resume-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.resume-viewer { display: block; width: 100%; height: clamp(20rem, 50svh, 30rem); border: 1px solid var(--rule); border-radius: .75rem; }

@media (max-width: 42rem) {
  .intro {
    grid-template-columns: minmax(0, 1fr) clamp(5rem, 25vw, 9rem);
    grid-template-areas: "name photo" "role photo" "bio bio" "links links";
    gap: .85rem 1rem;
    padding: 2.5rem 0 3.5rem;
  }
  .intro-copy { display: contents; }
  h1 { grid-area: name; width: min(100%, 15rem); margin: 0; }
  .role { grid-area: role; font-size: clamp(2rem, 6.8vw, 2.8rem); }
  .portrait { grid-area: photo; }
  .bio { grid-area: bio; margin: .45rem 0; }
  .profile-links { grid-area: links; }
  .entries { grid-template-columns: 1fr; }
  article + article { border-left: 0; border-top: 1px solid var(--rule); }
}
