@font-face {
  font-family: "Crimson Text";
  src: url("assets/home/crimson-text.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f9f6f0;
  --ink: #594438;
  --heading: #38281f;
  --rust: #954224;
  --rule: #e9e1d7;
  --pencil: #ad9888;
  --card: #fffdf8;
  --card-edge: #dcd0c3;
  --inset: #eae0d4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #201c19;
    --ink: #c6b8aa;
    --heading: #efe2d5;
    --rust: #eba583;
    --rule: #38312c;
    --pencil: #8e7869;
    --card: #51463d;
    --card-edge: #65564b;
    --inset: #3b332e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 .9375rem/1.5 "Inter", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.012em;
}

main {
  width: min(32rem, calc(100% - 3rem));
  margin-inline: auto;
  padding-block: clamp(2.75rem, 9vh, 5.25rem) 4rem;
}


header p { margin: 0; }
a { color: inherit; }

p a {
  text-decoration-color: var(--pencil);
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
}

a:hover,
a:focus-visible { color: var(--rust); }

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

section { margin-top: 2.35rem; }
section + section { margin-top: 1.85rem; }

h2 {
  margin: 0;
  color: var(--heading);
  font: bold italic 1.4rem/1.2 "Crimson Text", Georgia, serif;
  letter-spacing: -.025em;
}

ul {
  list-style: none;
  padding: 0;
  margin: .63rem 0 0;
}

li { border-bottom: 1px solid var(--rule); }

.entry {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  min-height: 3.45rem;
  padding: .45rem .15rem;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.stack {
  flex: 0 0 54px;
  height: 33px;
  position: relative;
  isolation: isolate;
}

.stack::before,
.stack::after,
.cover {
  position: absolute;
  inset: 0;
  background: var(--card);
  border: 1px solid var(--card-edge);
  box-shadow: 0 1px 2px #26160d22;
}

.stack::before,
.stack::after {
  content: "";
  z-index: -1;
}

.stack::before { transform: translate(-1px, -1px) rotate(-5deg); }
.stack::after { transform: translate(1px, -1px) rotate(4deg); }

.cover {
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: cover;
}

.letter {
  display: grid;
  place-items: center;
  background: linear-gradient(var(--inset), var(--inset)) content-box, var(--card);
  color: var(--heading);
  font: italic 1.25rem/1 "Crimson Text", Georgia, serif;
}

.letter::after { content: attr(data-letter); }

.arrow {
  color: var(--pencil);
  margin-left: auto;
  font-size: .8rem;
}

@media (prefers-reduced-motion: no-preference) {
  .cover, .stack::before, .stack::after {
    transition: transform 200ms ease-out;
  }

  a.entry:focus-visible,
  a.entry:active {
    --back: translate(-4px, -2px) rotate(-12deg);
    --middle: translate(3px, -2px) rotate(8deg);
    --front: translateY(-2px) rotate(-2deg);
  }

  @media (hover: hover) {
    a.entry:hover {
      --back: translate(-4px, -2px) rotate(-12deg);
      --middle: translate(3px, -2px) rotate(8deg);
      --front: translateY(-2px) rotate(-2deg);
    }
  }

  .stack::before { transform: var(--back, translate(-1px, -1px) rotate(-5deg)); }
  .stack::after { transform: var(--middle, translate(1px, -1px) rotate(4deg)); }
  .cover { transform: var(--front, none); }
}
