@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #fdfdfb;
  --ink: #17181a;
  --ink-soft: #5b5f66;
  --rule: #dcddd8;
  --link: #1a3fc4;
  --link-visited: #5a3a9c;

  --year-col: 7rem;
  --text-col: 34rem;
  --gap: 2.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131416;
    --ink: #ecebe6;
    --ink-soft: #a2a5ab;
    --rule: #33353a;
    --link: #9db4ff;
    --link-visited: #c3a8f2;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 3rem 1.25rem 4rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", "Iowan Old Style", Charter, Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}

.page {
  max-width: 68rem;
  margin: 0 auto;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

@media (hover: hover) {
  a:hover {
    text-decoration-thickness: 2px;
  }
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* Intro */

.intro {
  max-width: var(--text-col);
  padding-bottom: 3.5rem;
}

.intro h1 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.role {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.intro .about {
  margin-top: 1.5rem;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.contact a {
  display: inline-block;
  padding: 0.35rem 0;
}

/* Sections */

section {
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

section + section {
  margin-top: 4rem;
}

section > h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

/* Project log */

.project {
  display: grid;
  gap: 1rem;
  padding-bottom: 2.5rem;
}

.project + .project {
  border-top: 1px solid var(--rule);
  padding-top: 2.5rem;
}

.project:last-child {
  padding-bottom: 0;
}

.years {
  color: var(--ink-soft);
  font-size: 1rem;
  font-variant-numeric: tabular-nums lining-nums;
}

.project h3 {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project .summary {
  margin-top: 0.75rem;
}

.meta {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.where {
  margin-top: 0.75rem;
}

.shot {
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* Earlier work: no screenshots, tighter rows */

.earlier .project h3 {
  font-size: 1.25rem;
}

.earlier .project {
  padding-bottom: 1.75rem;
}

.earlier .project + .project {
  padding-top: 1.75rem;
}

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 1rem;
}

/* Wide enough for the year to sit in its own column */

@media (min-width: 44em) {
  body {
    padding-top: 5rem;
  }

  .intro {
    margin-left: calc(var(--year-col) + var(--gap));
  }

  .intro h1 {
    font-size: 3.25rem;
  }

  section > h2 {
    margin-left: calc(var(--year-col) + var(--gap));
  }

  .project {
    grid-template-columns: var(--year-col) minmax(0, var(--text-col));
    column-gap: var(--gap);
  }

  .years {
    padding-top: 0.5rem;
  }

  .shot {
    grid-column: 2;
    margin-top: 0.5rem;
  }

  footer p {
    margin-left: calc(var(--year-col) + var(--gap));
  }
}

/* Wide enough for the screenshot to sit beside the text */

@media (min-width: 68em) {
  .project {
    grid-template-columns: var(--year-col) minmax(0, var(--text-col)) minmax(0, 1fr);
    align-items: start;
  }

  .shot {
    grid-column: 3;
    margin-top: 0.5rem;
  }
}

@media print {
  body {
    font-size: 11pt;
    padding: 0;
  }

  .shot {
    display: none;
  }
}
