/* Adire: indigo resist-dye from Abeokuta, set as a reading page.
   One bold element (the dyed band at the top). Everything else stays quiet. */

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/literata-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/literata-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url("../fonts/literata-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f5f6fa;    /* cool undyed cotton */
  --ink: #161c42;      /* indigo-black, the darkest dip */
  --indigo: #24317f;   /* adire indigo */
  --resist: #c4cbea;   /* where the starch held the dye back */
  --muted: #545b80;
  --rule: #d3d8ee;
  --serif: "Literata", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: oldstyle-nums;
}

/* The dyed band */
.band {
  height: clamp(56px, 9vw, 96px);
  display: block;
  border-bottom: 4px solid var(--ink);
}
.band svg { display: block; }

.page {
  max-width: 37rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

a {
  color: var(--indigo);
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, var(--indigo) 55%, transparent);
}
a:hover { text-decoration-style: solid; text-decoration-color: var(--indigo); }
a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 2px; }

/* Masthead */
.masthead { margin-bottom: 3rem; }

.masthead .name {
  display: block;
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 3.6rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
}
a.name:hover { color: var(--indigo); }

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
}
nav a { text-decoration: none; color: var(--muted); padding-bottom: 2px; }
nav a:hover { color: var(--indigo); }
nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--indigo); }

/* Type scale: 18 / 20 / 24 / 32 */
h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
}
h2 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--indigo);
  margin: 2.75rem 0 0.75rem;
}

p { margin: 0 0 1.1rem; }

.lede {
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 450;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}
.lede-small { color: var(--muted); }

.meta {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  font-variant-numeric: lining-nums;
}

/* Lists */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--indigo);
}

.entries { list-style: none; margin: 0; padding: 0; }
.entries li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
}
.entries li:first-child { border-top: 1px dashed var(--rule); }

.inline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

/* Work */
.work { list-style: none; margin: 0; padding: 0; }
.work li {
  padding: 1.25rem 0 0.5rem;
  border-top: 1px dashed var(--rule);
}
.work li:first-child { border-top: 0; padding-top: 0; }
.work h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}
.work .meta { margin: 0.1rem 0 0.5rem; }
.work .when {
  margin-left: 0.6rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--resist) 55%, transparent);
  color: var(--indigo);
  font-size: 0.8rem;
}

.section-title { margin-top: 3rem; }

/* Books */
.year h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  font-variant-numeric: lining-nums;
}
.books { list-style: none; margin: 0; padding: 0; }
.books li { margin-bottom: 0.9rem; }
.book-title { font-style: italic; }
.books .note { margin: 0.1rem 0 0; color: var(--muted); font-size: 1rem; }

/* Posts */
.post h1 { font-size: 2.25rem; margin-bottom: 0.5rem; }
.post .meta { margin-bottom: 2rem; }
.prose { font-size: 1.1875rem; line-height: 1.7; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35rem; }
.prose li::marker { color: var(--indigo); }
.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--indigo);
  font-style: italic;
}
.prose img { max-width: 100%; height: auto; border-radius: 3px; }
.prose pre { overflow-x: auto; font-size: 0.9rem; background: #e9ecf6; padding: 0.9rem; border-radius: 4px; }

.more { margin-top: 1.25rem; font-family: var(--sans); font-size: 1rem; }

.colophon {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  .lede { font-size: 1.3rem; }
  .entries li { flex-direction: column; }
}
