@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 {
  --paper: #f7f5ef;
  --ink: #24231f;
  --muted: #6f6b62;
  --rule: #c9c4b8;
  --visited: #785f69;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color: var(--ink);
  scrollbar-color: var(--muted) var(--ink);
  font-family: 'Geist', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

body {
  min-height: 100vh;
  margin: 0;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.dither-field {
  position: fixed;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.site-shell,
.article-shell {
  width: min(47rem, calc(100% - 3rem));
  margin: 3rem auto;
  padding: 2.5rem;
  background: var(--paper);
  isolation: isolate;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

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

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

.masthead {
  position: relative;
  width: 100%;
  min-height: 19rem;
  margin: 0 0 0.75rem -1rem;
}

.masthead img {
  width: 21rem;
  mix-blend-mode: multiply;
}

.site-name {
  position: absolute;
  z-index: 1;
  left: 11rem;
  bottom: 1.75rem;
  margin: 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 430;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.section-note,
.meta {
  color: var(--muted);
  font-size: 0.75rem;
}

.intro {
  margin: 0 0 0 13.25rem;
  max-width: 32rem;
  font-size: 0.93rem;
}

.section {
  margin-top: 2.75rem;
}

.section h2 {
  margin: 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px dotted var(--rule);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
}

.experience-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-item {
  padding: 0.75rem 0;
  border-bottom: 1px dotted var(--rule);
}

.experience-item {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
}

.experience-item time {
  color: var(--muted);
  font-size: 0.75rem;
}

.experience-item p {
  margin: 0;
}

.role {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.95rem;
}

.organization {
  color: var(--muted);
  font-size: 0.78rem;
}

.experience-item .job-note,
.project-item .job-note {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-item {
  padding: 0.75rem 0;
  border-bottom: 1px dotted var(--rule);
}

.heading-date {
  color: var(--muted);
  font-family: 'Geist', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
}

.project-soon {
  color: var(--muted);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.9rem;
  font-style: italic;
}

.project-name {
  margin: 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 400;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 3.5rem;
  padding-top: 0.65rem;
  border-top: 1px dotted var(--rule);
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer span::after {
  content: '·';
}

.article-nav {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.article-nav span {
  padding: 0 0.35rem;
}

@media (max-width: 40rem) {
  .site-shell,
  .article-shell {
    width: calc(100% - 1.5rem);
    margin: 0.75rem auto;
    padding: 1.5rem 1rem;
  }

  .masthead {
    min-height: 15.5rem;
    margin-left: -0.5rem;
  }

  .masthead img {
    width: 17rem;
  }

  .site-name {
    left: 8.75rem;
    bottom: 1.4rem;
  }

  .intro {
    margin-left: 0;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* 404: the dither field fills the screen and carries the number itself;
   a small paper note at the bottom says where you are */
.not-found {
  display: grid;
  min-height: 100vh;
  align-items: end;
  justify-items: center;
}

.not-found-note {
  margin: 0 1rem 2.5rem;
  padding: 0.7rem 1rem 0.75rem;
  background: var(--paper);
  font-size: 0.8125rem;
  text-align: center;
}

.not-found-note h1 {
  margin: 0 0 0.15rem;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
}

.not-found-note p {
  margin: 0;
  color: var(--muted);
}

/* the dithered field shows the number; without it, the note says it */
.not-found:has(.dither-field) .not-found-code {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
