@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --color-background: #151614;
  --color-text: #ebeae4;
  --color-secondary: #a19f98;
  --color-divider: #343530;
  --font-interface: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-reading: "Newsreader", "Iowan Old Style", Georgia, serif;
  --page-width: 52.5rem;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 20rem;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-interface);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  color: var(--color-secondary);
}

button,
a {
  touch-action: manipulation;
  cursor: default;
}

button:focus-visible,
a:focus-visible {
  outline: 0.125rem solid var(--color-text);
  outline-offset: 0.25rem;
}

.page-shell {
  width: min(var(--page-width), calc(100% - 3rem));
  margin-inline: auto;
  padding-block: 2.25rem 5rem;
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-bottom: 1.75rem;
}

.identity__name {
  font-weight: 500;
  letter-spacing: -0.02em;
}

.identity__links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-secondary);
}

.identity__links a:hover {
  color: var(--color-text);
}

.bio,
.content-section {
  border-top: 1px solid var(--color-divider);
  padding-block: 3rem;
}

.section-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

h1,
h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: inherit;
}

.bio-switch {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.bio-switch__option {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--color-secondary);
  font: inherit;
}

.bio-switch__option[aria-selected="true"] {
  border-bottom-color: var(--color-text);
  color: var(--color-text);
}

.bio-panel {
  font-family: var(--font-reading);
  font-size: 1.1875rem;
  line-height: 1.6;
}

.bio-panel p {
  max-width: 42rem;
}

.story-media {
  width: 76%;
  margin: 2.5rem 0;
}

.story-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.story-media--pair,
.story-media--high-school,
.story-media--events,
.story-media--graduation {
  display: grid;
  gap: 1rem;
}

.story-media--pair,
.story-media--high-school,
.story-media--events {
  align-items: center;
}

.story-media--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-media--high-school {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
}

.story-media--events {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.story-media--graduation {
  grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr);
  align-items: end;
}

.story-media__event-stack {
  display: grid;
  gap: 1rem;
}

.bio-panel > :first-child {
  margin-top: 0;
}

.bio-panel > :last-child {
  margin-bottom: 0;
}

.work-list,
.shipped-list {
  margin-top: 2rem;
}

.work-company {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 2rem;
  padding-block: 1.75rem;
}

.work-company:first-child,
.shipped-project:first-child {
  padding-top: 0;
}

.work-company + .work-company,
.shipped-project + .shipped-project {
  border-top: 1px solid var(--color-divider);
}

.work-company:last-child,
.shipped-project:last-child {
  padding-bottom: 0;
}

.work-company h3,
.work-role h4,
.shipped-project h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
}

.work-company__roles {
  display: grid;
  gap: 1.75rem;
}

.work-role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.5rem;
}

.work-role__heading {
  display: contents;
}

.work-role__dates {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--color-secondary);
  font-size: 0.9375rem;
}

.work-role > p {
  grid-column: 1;
  margin: 0.55rem 0 0;
  color: var(--color-secondary);
}

.work-role a:hover {
  color: var(--color-text);
}

.shipped-project {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) auto;
  gap: 2rem;
  padding-block: 1.25rem;
}

.shipped-project h3,
.shipped-project p {
  margin: 0;
}

.shipped-project > p,
.shipped-project > time {
  color: var(--color-secondary);
}

.shipped-project__meta,
.shipped-project > time {
  font-size: 0.9375rem;
  white-space: nowrap;
}

@media (max-width: 37.5rem) {
  .page-shell {
    width: min(var(--page-width), calc(100% - 2rem));
    padding-block: 1.5rem 3.5rem;
  }

  .bio,
  .content-section {
    padding-block: 2.25rem;
  }

  .section-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .bio-panel {
    font-size: 1.125rem;
  }

  .story-media {
    width: 100%;
    margin-block: 2rem;
  }

  .story-media--pair,
  .story-media--high-school,
  .story-media--events,
  .story-media--graduation {
    grid-template-columns: 1fr;
  }

  .work-company {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .shipped-project {
    grid-template-columns: 1fr auto;
    gap: 0.4rem 1rem;
  }

  .shipped-project > p:not(.shipped-project__meta) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .work-role__heading {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }

  .work-role {
    display: block;
  }
}
