:root {
  color-scheme: light dark;
  /* Palette taken from the macaron favicon */
  --bg: #f2eded;        /* pale tint of the mauve-gray background */
  --text: #2b1616;      /* chocolate filling */
  --muted: #765f60;     /* deeper mauve-gray */
  --accent: #712529;    /* raspberry shell: links */
  --brand: #712529;     /* raspberry shell: name and headings */
  --highlight: #712529; /* raspberry shell: underlines and rules */
  --rule: #ddd0d0;
  --plate: #e7dddd;
  --measure: 36rem;
  --wide: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1213;
    --text: #f2e7e5;
    --muted: #b9a4a4;
    --accent: #e3868c;
    --brand: #e3868c;
    --highlight: #e3868c;
    --rule: #3c2627;
    --plate: #2d1b1c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--highlight); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
cite { font-style: italic; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header */
.site-header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.wordmark {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--brand);
  text-decoration: none;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 3px solid transparent;
}
.site-header nav a:hover { color: var(--text); }
.site-header nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--highlight); }

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Text pages */
h1, h2 { color: var(--brand); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: 0 0 0.5rem; }
h1 a { color: inherit; text-decoration: none; }
h1 a:hover { color: var(--accent); }
.prose { max-width: var(--measure); }
.prose p, .prose ul { margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.35em; }
.meta { color: var(--muted); margin: 0 0 2rem; font-size: 0.95rem; }

.post { max-width: 48rem; }
.post .prose { font-size: 1.125rem; line-height: 1.65; }
.post-image { margin: 0 0 2.5rem; border-radius: 3px; width: 100%; background: var(--plate); }
.signoff { font-weight: 500; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, var(--measure));
  gap: 2.5rem;
  align-items: start;
}
.portrait { border-radius: 50%; width: 100%; background: var(--plate); }
@media (max-width: 40rem) {
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .portrait { width: 9rem; }
}

/* Work */
.work-group { margin-bottom: 4rem; }
.work-group h2 {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--highlight);
}
.covers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 2rem 1.5rem;
  align-items: start;
}
.covers-animation { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.covers a { display: block; color: var(--text); text-decoration: none; }
.covers img {
  width: 100%;
  border-radius: 3px;
  background: var(--plate);
  transition: transform 0.25s ease;
}
.covers-animation img { aspect-ratio: 16 / 9; object-fit: cover; }
.covers a:hover img { transform: translateY(-3px); }
.covers .caption {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.covers a:hover .caption { color: var(--accent); }

/* Footer */
.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .covers img { transition: none; }
  .covers a:hover img { transform: none; }
}
