/* Palette: https://coolors.co/palette/000000-14213d-fca311-e5e5e5-ffffff
   --muted and the dark --rule are tints mixed from the navy and the greys. */
:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --ink: #14213d;
  --muted: #5b6477;
  --rule: #e5e5e5;
  --accent: #fca311;
  --focus: #14213d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14213d;
    --ink: #ffffff;
    --muted: #b1b4bb;
    --rule: #303c54;
    --focus: #fca311;
  }
}

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

::selection {
  background: #fca311;
  color: #000000;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
}

main {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 6rem) clamp(1.25rem, 6vw, 4rem);
}

h1,
p,
ul {
  margin: 0;
}

.intro {
  max-width: 34rem;
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
}

.intro h1 {
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.intro p,
.note {
  color: var(--muted);
}

.intro a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.intro a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.projects {
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1.5rem, 3.5vw, 2.25rem);
  border-top: 1px solid var(--rule);
}

.project__name {
  color: inherit;
  font-size: clamp(3.75rem, 15vw, 9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.035em;
  text-underline-offset: 0.09em;
  transition: text-decoration-thickness 0.15s ease;
}

/* Stretch the link over the whole row. */
.project__name::after {
  content: "";
  position: absolute;
  inset: 0;
}

.project:hover .project__name,
.project__name:focus-visible {
  text-decoration-thickness: 0.09em;
}

.project__name:focus-visible {
  outline: none;
}

.project__name:focus-visible::after {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.project__host {
  color: var(--muted);
  font-size: 1rem;
  font-style: italic;
}

.project__about {
  grid-column: 1 / -1;
  max-width: 34rem;
  margin-top: 0.75rem;
}

.note {
  margin-top: 1.5rem;
  font-size: 1rem;
}

@media (max-width: 40rem) {
  .project {
    grid-template-columns: 1fr;
  }

  .project__host {
    margin-top: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project__name {
    transition: none;
  }
}
