@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel Mark";
  src: url("/assets/fonts/cinzel-m.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #000000;
  --paper: #ffffff;
  font-family: "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ffffff;
  --paper: #000000;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ink: #ffffff;
    --paper: #000000;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 3.75rem;
  background: var(--paper);
}

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

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

button {
  color: inherit;
  font: inherit;
}

.skip {
  position: absolute;
  z-index: 100;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  overflow: visible;
  clip-path: none;
  background: var(--ink);
  color: var(--paper);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 3.75rem;
  padding: 0 clamp(1.25rem, 3vw, 3.5rem);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 1.5rem;
  font-family: "Cinzel Mark", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.06em;
}

nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

nav a,
.contact-links a,
.brand {
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
}

nav a:hover,
nav a:focus-visible,
.contact-links a:hover,
.contact-links a:focus-visible,
.brand:hover,
.brand:focus-visible {
  text-decoration-line: underline;
}

.theme-toggle {
  justify-self: end;
  display: none;
  gap: .75rem;
  padding: .45rem 0;
  border: 0;
  background: transparent;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
}

.js .theme-toggle {
  display: flex;
}

.theme-toggle:hover [data-theme-label],
.theme-toggle:focus-visible [data-theme-label] {
  text-decoration: underline;
  text-underline-offset: .3em;
}

main {
  position: relative;
  z-index: 1;
  padding-inline: clamp(1.25rem, 3vw, 3.5rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(18rem, 5fr);
  align-items: end;
  gap: clamp(2rem, 4vw, 4.5rem);
  padding-block: clamp(2.75rem, 4vw, 4rem) clamp(3rem, 4.5vw, 4.5rem);
}

.trace {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 5.2vw, 5rem);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.06em;
}

.hero p {
  max-width: 35ch;
  margin: 0;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.42;
  letter-spacing: -.015em;
  text-wrap: pretty;
}

.hero em {
  font-family: "EB Garamond", Garamond, serif;
  font-size: 1.12em;
  font-weight: 400;
  line-height: 1;
}

.section {
  padding-block: clamp(3rem, 4vw, 4.5rem);
  border-top: 1px solid var(--ink);
}

.section-title {
  margin: 0 0 clamp(1.75rem, 2.5vw, 2.5rem);
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(20rem, 5fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
}

.project {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--ink);
  transition: background-color .18s ease, color .18s ease;
}

.project:last-child {
  border-bottom: 1px solid var(--ink);
}

.project:hover,
.project:focus-visible {
  outline: 0;
  background: var(--ink);
  color: var(--paper);
}

.project-marker {
  font-size: .85rem;
  font-weight: 600;
}

.project-copy {
  display: grid;
  gap: .45rem;
}

.project-title {
  font-size: clamp(1.5rem, 2vw, 2.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}

.project-description {
  max-width: 56ch;
  font-size: .9rem;
  line-height: 1.45;
}

.project-arrow {
  margin-top: .15rem;
}

.project-arrow,
.external-arrow,
.external::after {
  display: inline-block;
  width: .72em;
  height: .72em;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1 11 11 1M4 1h7v7' fill='none' stroke='black' stroke-width='1.25'/%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 12 12'%3E%3Cpath d='M1 11 11 1M4 1h7v7' fill='none' stroke='black' stroke-width='1.25'/%3E%3C/svg%3E") center / contain no-repeat;
}

.external-arrow {
  margin-left: .25em;
}

.external::after {
  content: "";
  margin-left: .4em;
}

.work-preview {
  position: sticky;
  top: 7rem;
  margin: 0;
}

.work-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ink);
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

:root[data-theme="dark"] .work-preview img {
  filter: grayscale(1) contrast(1.05) invert(1);
}

.experience-list {
  margin-left: calc(100% / 6);
}

.experience-row {
  display: grid;
  grid-template-columns: 2fr 8fr;
  gap: 1rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--ink);
}

.experience-row:last-child {
  border-bottom: 1px solid var(--ink);
}

a.experience-row:hover h3,
a.experience-row:focus-visible h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

.experience-date {
  margin: .3rem 0 0;
  font-size: .67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .13em;
}

.experience-row h3 {
  margin: 0 0 .3rem;
  font-size: clamp(1.5rem, 2vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}

.experience-row p:not(.experience-date) {
  margin: 0;
}

.experience-description {
  max-width: 62ch;
  padding-top: .65rem;
  font-size: .92rem;
  line-height: 1.55;
}

.recognition {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin: 1.25rem 0 0 calc(100% / 6);
  max-width: 70rem;
  font-size: .75rem;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.recognition strong {
  margin-right: .4rem;
}

.contact {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) auto auto;
  align-items: baseline;
  gap: 1.5rem 2rem;
  padding-block: 2.5rem;
}

.contact h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
}

.contact h2 a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}

.contact > p {
  margin: 0;
  font-family: "EB Garamond", Garamond, serif;
  font-size: 1.2rem;
  font-style: italic;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.contact-links a {
  display: flex;
  align-items: center;
  min-height: 1.5rem;
}

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

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  nav {
    display: none;
  }

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

  .work-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-block: 2.5rem 3rem;
  }

  .work-preview {
    display: none;
  }

  .experience-list,
  .recognition {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 3.5rem;
  }

  .brand {
    font-size: 1.25rem;
  }

  .hero {
    gap: 1.25rem;
    padding-block: 2rem 2.5rem;
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 2.75rem);
  }

  .hero p {
    max-width: 31ch;
    font-size: 1rem;
    line-height: 1.45;
  }

  .project {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: .6rem;
  }

  .experience-row {
    grid-template-columns: 1fr;
  }

}

@media (hover: none), (pointer: coarse) {
  .trace {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trace {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
