:root {
  color-scheme: dark;
  --page: #151515;
  --text: #f2f2f2;
  --muted: #bcbcbc;
  --inactive: #777775;
  --line: #555;
  --header-inset: 1.5%;
  --shell-rail: clamp(250px, 18vw, 320px);
  --font-sans: Arial, Helvetica, sans-serif;
  --type-small: .85rem;
  --type-copy: 1rem;
  --type-lead: 1.18rem;
  --type-body: 1.25rem;
  --type-body-mobile: 1.0625rem;
  --type-section-heading: 1.5rem;
  --type-navigation: 1.75rem;
  --type-social: 2.36rem;
  --type-brand: clamp(2rem, 4vw, 3rem);
  --type-page-title: clamp(2rem, 5vw, 3.4rem);
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.45;
}

p strong {
  color: rgb(242, 242, 242);
  font-weight: 550;
}

a { color: inherit; }

a:hover,
a:focus-visible { color: #fff; text-decoration-thickness: 2px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  padding: 17px var(--header-inset) 14px;
}

.site-header::after {
  position: absolute;
  right: var(--header-inset);
  bottom: 0;
  left: var(--header-inset);
  height: 1px;
  content: "";
  background: var(--line);
}

.site-name {
  font-size: var(--type-brand);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.utility-nav,
.section-nav {
  display: flex;
  font-size: var(--type-navigation);
}

.utility-nav { gap: .5rem; }

.utility-nav a,
.resume-download,
.contact-email,
.about-link,
.social-link,
.project-repository-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.utility-nav a::before,
.resume-download::before,
.contact-email::before,
.about-link::before,
.social-link::before,
.project-repository-label::before {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  content: "";
  background: currentColor;
  transition: width 500ms ease;
}

.utility-nav a:hover::before,
.utility-nav a:focus-visible::before,
.resume-download:hover::before,
.resume-download:focus-visible::before,
.contact-email:hover::before,
.contact-email:focus-visible::before,
.about-link:hover::before,
.about-link:focus-visible::before,
.social-link:hover::before,
.social-link:focus-visible::before,
.project-repository-link:hover .project-repository-label::before,
.project-repository-link:focus-visible .project-repository-label::before {
  width: 100%;
}

.section-nav a[aria-current="page"] { color: var(--text); }

.utility-nav span { color: var(--muted); }

.section-nav {
  flex-direction: column;
  align-items: flex-start;
  margin: 18px 0 0;
  gap: 1px;
}

.section-nav a {
  display: inline-block;
  padding: 0 3px;
  color: var(--inactive);
  text-decoration: none;
  transform-origin: left center;
  transition: color 200ms ease, transform 200ms ease;
}

.section-nav a::before {
  display: inline-block;
  width: .55em;
  content: "";
}

.section-nav a[aria-current="page"]::before { content: "\2022"; }

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--muted);
  transform: scale(1.04);
}

.section-nav a[aria-current="page"]:hover,
.section-nav a[aria-current="page"]:focus-visible {
  color: var(--text);
}

.page-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--shell-rail) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  margin: 0 var(--header-inset);
}

.section-nav { grid-column: 1; }

main {
  grid-column: 2;
  height: 100%;
  max-width: 750px;
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 75px 24px 75px;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

main::-webkit-scrollbar { display: none; }

.collection-page,
.resume-page,
.contact-page,
.links-page {
  width: 100%;
  max-width: none;
}

.contact-page {
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

.contact-lead,
.resume-lead,
.about-lead {
  color: var(--muted);
  font-size: var(--type-lead);
  line-height: 1.4;
}

.links-page h1 {
  margin-bottom: 0;
}

.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 0;
  margin: 0;
  padding: 24px 0 0;
  list-style: none;
}

.social-links li {
  display: flex;
  align-items: center;
}

.social-links li + li::before {
  margin: 0 clamp(18px, 2vw, 36px);
  color: var(--text);
  content: "\00b7";
  font-size: var(--type-social);
  font-weight: 700;
}

.social-link {
  gap: .48em;
  padding-bottom: 3px;
  font-size: var(--type-social);
}

.social-icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.resume-page {
  display: grid;
  grid-template-columns:
    calc(50vw - var(--header-inset) - var(--shell-rail) - 24px)
    minmax(0, 1fr);
  align-items: start;
  gap: 0;
}

.resume-introduction {
  width: 100%;
  max-width: 750px;
  padding-right: clamp(24px, 3vw, 52px);
}

.resume-lead {
  max-width: 58ch;
}

.resume-download {
  padding-bottom: 3px;
  font-size: var(--type-lead);
}

.resume-preview-column {
  display: flex;
  min-width: 0;
  justify-content: center;
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 3vw, 52px);
}

.resume-document {
  position: relative;
  display: block;
  width: min(100%, 520px);
  aspect-ratio: 8.5 / 11;
  overflow: hidden;
  background: #f2f1ed;
  transition: transform 240ms ease;
}

.resume-document:hover,
.resume-document:focus-within {
  transform: translateY(-6px);
}

.resume-pdf-preview {
  display: block;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  margin: -2px;
  border: 0;
  pointer-events: none;
}

.resume-document-action {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  background: rgb(21 21 21 / 88%);
  color: var(--muted);
  font-size: clamp(.52rem, .72vw, .68rem);
  letter-spacing: .06em;
  line-height: 1.4;
  opacity: 0;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 220ms ease;
  z-index: 1;
}

.resume-document-action:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -5px;
}

.resume-document:hover .resume-document-action,
.resume-document:focus-within .resume-document-action {
  opacity: 1;
}

.resume-document-action strong {
  color: var(--text);
  font-size: 1.35em;
  font-weight: 600;
}

.collection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 28px;
}

.collection-heading h1 { margin-bottom: 0; }

.collection-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  display: block;
  width: 100%;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 7px 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}

.search-field input::placeholder { color: var(--inactive); opacity: 1; }

.search-field input:focus-visible::placeholder { color: var(--muted); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 52px 24px;
}

.project-card[hidden] { display: none; }

.project-card {
  position: relative;
  transition: transform 240ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-media {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  place-items: center;
  margin-bottom: 16px;
  background: #222;
  color: #858583;
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background-color 240ms ease, box-shadow 240ms ease;
}

.project-card:hover .project-media {
  background-color: #292929;
  box-shadow: 0 14px 30px rgb(0 0 0 / 24%);
}

.project-media img,
.project-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-media--contain img { object-fit: contain; }

.project-card-copy { padding: 0 2px; }

.project-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
}

.project-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.project-year {
  color: var(--inactive);
  font-size: .75rem;
  transition: color 240ms ease;
}

.project-card p {
  max-width: 42ch;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: .82rem;
}

.project-card:hover .project-year { color: var(--muted); }

.project-card-link {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: 2px;
}

.project-card-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 6px;
}

.project-detail-page {
  --project-content-width: 75%;
  width: 100%;
  max-width: none;
}

.project-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.project-detail-heading h1 { margin-bottom: 0; }

.project-repository-link {
  flex: none;
  gap: .45em;
  margin-bottom: -8px;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  white-space: nowrap;
}

.project-repository-label {
  position: relative;
  display: inline-block;
}

.project-repository-label::before { height: 1px; }

.project-repository-icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.387-1.335-1.756-1.335-1.756-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.418-1.305.762-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.387-1.335-1.756-1.335-1.756-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.418-1.305.762-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.detail-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #222;
  color: var(--inactive);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detail-media--hero {
  width: var(--project-content-width);
  aspect-ratio: 16 / 9;
  margin-right: auto;
  margin-left: 0;
  background:
    linear-gradient(135deg, transparent 49.8%, #3f3f3d 50%, transparent 50.2%),
    #222;
}

.detail-media--contain { background: #222; }

.detail-media img,
.detail-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.detail-media img[data-fit="contain"] { object-fit: contain; }

.project-article {
  display: flow-root;
  width: var(--project-content-width);
  margin-top: clamp(24px, 2.5vw, 36px);
  margin-right: auto;
  margin-left: 0;
}

.project-article h2 {
  max-width: none;
  margin: 0 0 20px;
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

.project-article h3 {
  margin: 0 0 12px;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.project-article p {
  margin-bottom: 1em;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.68;
  hyphens: auto;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
}

.project-article > h2 + p {
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.58;
}

.project-article ul,
.project-article ol {
  margin: 16px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.55;
}

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

.project-article-section { margin-top: clamp(22px, 2.5vw, 34px); }

.project-article-media {
  min-height: 0;
  aspect-ratio: 4 / 3;
  font-size: .66rem;
  break-inside: avoid;
}

.project-article-media--wide {
  float: right;
  width: 40%;
  aspect-ratio: 16 / 9;
  margin: .35em 0 1.4em clamp(24px, 3vw, 42px);
}

.project-article-media--left {
  float: left;
  margin-right: clamp(24px, 3vw, 42px);
  margin-left: 0;
}

.project-article-media--compact {
  width: 34%;
  aspect-ratio: 4 / 3;
}

.project-article-media-grid {
  display: grid;
  float: left;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 44%;
  margin: .35em clamp(24px, 3vw, 42px) 1.4em 0;
  break-inside: avoid;
}

.project-article-media-grid--right {
  float: right;
  margin-right: 0;
  margin-left: clamp(24px, 3vw, 42px);
}

.project-author {
  clear: both;
  margin-top: clamp(58px, 7vw, 88px);
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}

.empty-state {
  margin-top: 8px;
  color: var(--muted);
  font-size: .9rem;
}

.about-page {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns:
    calc(50vw - var(--header-inset) - var(--shell-rail) - 24px)
    minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.about-introduction {
  position: sticky;
  top: 0;
  max-width: 560px;
  padding-right: clamp(16px, 1.75vw, 32px);
}

.about-introduction > p:not(.page-label, .about-lead) {
  color: var(--muted);
  font-size: var(--type-small);
}

.about-background {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: clamp(16px, 1.75vw, 32px);
}

.background-heading {
  margin: 0 0 16px;
}

.about-education {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: 112px 34px minmax(0, 1fr);
  gap: 0 14px;
}

.timeline-date {
  padding-top: 4px;
  color: var(--inactive);
  font-size: var(--type-small);
  text-align: right;
  white-space: nowrap;
}

.timeline-track {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-track::after {
  position: absolute;
  top: 15px;
  bottom: -63px;
  left: 50%;
  width: 1px;
  content: "";
  background: var(--line);
  transform: translateX(-50%);
}

.timeline-item:last-child .timeline-track::after { display: none; }

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 6px;
  border: 2px solid var(--inactive);
  border-radius: 50%;
  background: var(--page);
}

.timeline-item--current .timeline-date { color: var(--text); }

.timeline-item--current .timeline-dot {
  border-color: var(--text);
  background: var(--text);
  box-shadow: 0 0 0 5px var(--page), 0 0 0 6px var(--line);
}

.timeline-content {
  padding: 0 0 4px;
}

.timeline-context {
  margin-bottom: 13px;
  color: var(--inactive);
  font-size: var(--type-copy);
}

.timeline-content h2,
.timeline-content h3 {
  margin: 0;
  font-size: var(--type-section-heading);
  font-weight: 400;
}

.timeline-content > p:not(.timeline-context) {
  max-width: 75ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: var(--type-copy);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.page-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--type-small);
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 { margin: 0 0 20px; font-size: var(--type-page-title); font-weight: 400; line-height: 1.05; }
h2 { margin: 38px 0 8px; font-size: var(--type-navigation); font-weight: 400; }
p { margin: 0 0 16px; }

@media (max-width: 1250px) {
  .resume-page {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .resume-introduction { padding-right: 0; }
  .resume-preview-column {
    max-width: 820px;
    justify-content: flex-start;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 30px;
    padding-left: 0;
  }
  .about-page {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .about-introduction {
    position: static;
    max-width: 680px;
    padding-right: 0;
  }
  .about-background {
    max-width: 820px;
    margin-top: 30px;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 30px;
    padding-left: 0;
  }
}

@media (max-width: 1050px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .project-article-media--wide {
    float: none;
    width: 78%;
    margin-right: 0;
    margin-left: 0;
  }
  .project-article-media-grid {
    float: none;
    width: 88%;
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 650px) {
  body {
    display: block;
    height: auto;
    overflow: visible;
    font-size: var(--type-body-mobile);
  }
  .site-header { padding-top: 15px; gap: 1rem; }
  .utility-nav { flex-wrap: wrap; justify-content: flex-end; font-size: var(--type-copy); }
  .section-nav { margin-top: 14px; }
  .page-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 80px);
    overflow: visible;
    margin: 0 20px;
  }
  .section-nav { grid-column: 1; }
  main {
    grid-column: 1;
    height: auto;
    margin-top: 60px;
    overflow: visible;
    padding: 0;
  }
  .collection-heading { display: block; margin-bottom: 24px; }
  .project-grid { grid-template-columns: 1fr; gap: 44px; }
  .project-detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .project-repository-link { margin-bottom: 0; }
  .project-detail-page { --project-content-width: 100%; }
  .resume-document {
    width: 100%;
  }
  .project-article { width: 100%; margin-top: 52px; }
  .project-article p {
    hyphens: none;
    text-align: left;
  }
  .project-article-media--wide {
    float: none;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }
  .project-article-media-grid {
    float: none;
    grid-template-columns: 1fr;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }
  .timeline { gap: 40px; }
  .timeline-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 0 12px;
  }
  .timeline-date {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 8px;
    padding: 0;
    text-align: left;
  }
  .timeline-track {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .timeline-track::after { bottom: -52px; }
  .timeline-content {
    grid-column: 2;
    grid-row: 2;
  }
}
