/* rickydeanbro.com — hand-written. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter.woff2") format("woff2");
}

:root {
  --bg: #fafafa;
  --ink: #1a1a1a;
  --faded: #6f6f6f;
  --accent: #1a1a1a;
  --thread: #c4c4c4;   /* link underlines */
  --rule: #e4e4e4;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --ink: #e6e5e3;
    --faded: #8f8f8f;
    --accent: #e6e5e3;
    --thread: #4c4c4e;
    --rule: #2a2a2c;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  font-optical-sizing: auto;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.page {
  max-width: 41rem;
  margin-inline: auto;
  padding: clamp(2.75rem, 9vh, 5.5rem) 1.375rem 6rem;
}

/* ---- rule: one typeface. Inter everywhere; nothing else, ever. ---- */

* { font-family: inherit; }

/* ---- rule: no italics anywhere ---- */

em, i, cite, .lede { font-style: normal; }

/* utility voice: small, lowercase, quiet */
.caps {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---- header ---- */

header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.2em;
}

.site-name {
  font-weight: 400;
  color: var(--ink);
}

/* ---- body text ---- */

h1 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--faded);
  margin: 3rem 0 0.75rem;
}

p { margin: 0 0 1.1em; }

.lede {
  color: var(--faded);
  margin-bottom: 1.6em;
}

main a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--thread);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

main a:hover { text-decoration-color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* topics on the front page */
.topic { margin-bottom: 1.1em; }
.topic strong { font-weight: 600; }

/* ---- essay index ---- */

.essays {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
}

.essays li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  column-gap: 1.25rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}

.essays li:last-child { border-bottom: 1px solid var(--rule); }

.essay-date {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--faded);
  padding-top: 0.25rem;
}

.essay-title {
  font-weight: 500;
  font-size: 1.0625rem;
}

.essay-about {
  margin: 0.15rem 0 0;
  color: var(--faded);
}

@media (max-width: 34rem) {
  .essays li { grid-template-columns: 1fr; row-gap: 0.2rem; }
  .essay-date { padding-top: 0; }
}

/* ---- small parts ---- */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--faded);
  margin: 0 0 0.6rem;
}

.stack {
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  color: var(--faded);
  line-height: 1.8;
}

.aside {
  color: var(--faded);
  font-size: 1rem;
}
