/* Public site styles.

   1. Reset (modern-normalize + the base rules the old Tailwind build shipped;
      `highlight.css` and the rich-text content styles rely on it)
   2. Tokens
   3. Blocks, BEM-style: `.block`, `.block__element`, `.block--modifier`

   Breakpoints: 640px (small) and 768px (medium), mobile first.
*/

/* ==========================================================================
   1. Reset
   ========================================================================== */

html {
  tab-size: 4;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
}
hr {
  height: 0;
  color: inherit;
}
abbr[title] {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}
b,
strong {
  font-weight: bolder;
}
code,
kbd,
pre,
samp {
  font-family: ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
  font-size: 1em;
}
small {
  font-size: 80%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub {
  bottom: -.25em;
}
sup {
  top: -.5em;
}
table {
  text-indent: 0;
  border-color: inherit;
}
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}
button,
select {
  text-transform: none;
}
[type=button],
[type=reset],
[type=submit],
button {
  -webkit-appearance: button;
}
legend {
  padding: 0;
}
progress {
  vertical-align: baseline;
}
summary {
  display: list-item;
}
blockquote,
dd,
dl,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
pre {
  margin: 0;
}
button {
  background-color: transparent;
  background-image: none;
}
fieldset,
ol,
ul {
  margin: 0;
  padding: 0;
}
ol,
ul {
  list-style: none;
}
html {
  font-family: Helvetica,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  line-height: 1.5;
}
body {
  font-family: inherit;
  line-height: inherit;
}
*,
:after,
:before {
  box-sizing: border-box;
  border: 0 solid;
}
img {
  border-style: solid;
}
textarea {
  resize: vertical;
}
[role=button],
button {
  cursor: pointer;
}
table {
  border-collapse: collapse;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
a {
  color: inherit;
  text-decoration: inherit;
}
button,
input,
optgroup,
select,
textarea {
  padding: 0;
  line-height: inherit;
  color: inherit;
}
code,
kbd,
pre,
samp {
  font-family: Menlo,Monaco,Consolas,monospace;
}
audio,
canvas,
embed,
iframe,
img,
object,
svg,
video {
  display: block;
  vertical-align: middle;
}
img,
video {
  max-width: 100%;
  height: auto;
}
[hidden] {
  display: none;
}
@font-face {
  font-family: Merriweather;
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5ff;
  src: local(Merriweather),url(../fonts/merriweather-light.woff2) format("woff2"),url(../fonts/merriweather-light.woff) format("woff");
}
@font-face {
  font-family: Merriweather;
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  unicode-range: U+000-5ff;
  src: local(Merriweather),url(../fonts/merriweather-lightitalic.woff2) format("woff2"),url(../fonts/merriweather-lightitalic.woff) format("woff");
}
@font-face {
  font-family: Merriweather;
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5ff;
  src: local(Merriweather),url(../fonts/merriweather-bold.woff2) format("woff2"),url(../fonts/merriweather-bold.woff) format("woff");
}
svg {
  display: inline-block;
}
hr {
  border-top-width: 1px;
  margin: 30px 10%;
}
*,
::before,
::after {
  border-color: var(--color-line, #e5e7eb);
}
input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: #9ca3af;
}

html {
  font-size: 18px;
}

/* ==========================================================================
   2. Tokens
   ========================================================================== */

:root {
  --font-sans: Helvetica, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: Merriweather, Georgia, Cambria, "Times New Roman", Times, serif;

  --color-ink: #1f2937;         /* body text */
  --color-ink-soft: #374151;    /* secondary text, header border */
  --color-ink-muted: #4b5563;   /* footer, nav icons */
  --color-ink-faint: #6b7280;   /* dates */
  --color-line: #e5e7eb;
  --color-line-strong: #9ca3af;
  --color-surface: #fff;
  --color-surface-alt: #f3f4f6;
  --color-brand: #cd3700;
  --color-brand-dark: #991b1b;
  --color-accent: #dc2626;      /* section headings, tags */
  --color-link: #0074e8;

  --width-page: 1024px;
  --width-text: 48rem;
}

/* ==========================================================================
   3. Blocks
   ========================================================================== */

/* --- link: inline text link -------------------------------------------- */

.link,
.post a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.11em;
}
.link:hover,
.post a:hover {
  text-decoration: none;
}

/* --- page: body, main area and the centered container ------------------- */

.page {
  font-family: var(--font-sans);
  color: var(--color-ink);
  background-color: var(--color-surface);
  cursor: default;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.page__main {
  padding-bottom: 3rem;
}
.page__container {
  width: 100%;
  max-width: var(--width-page);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.page__section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.page__section--spaced {
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding-top: 0;
  padding-bottom: 0;
}

/* --- site-header: top bar with the brand tab and the menu --------------- */

.site-header {
  width: 100%;
  margin-bottom: 4rem;
  background-color: var(--color-surface-alt);
  border-color: var(--color-ink-soft);
}
.site-header__nav {
  position: relative;
  width: 100%;
  max-width: var(--width-page);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.site-header__brand {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  padding: 1rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.5rem;
  color: #fff;
  text-align: center;
  background-color: var(--color-brand);
  border-color: var(--color-brand-dark);
  border-bottom-width: 4px;
  transition: margin 0.15s cubic-bezier(0.4, 0, 0.2, 1), padding 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header__brand:hover {
  padding-top: 1.25rem;
}
.site-header__menu {
  display: flex;
  justify-content: flex-end;
}
.site-header__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  overflow: hidden;
  color: var(--color-ink-muted);
}
.site-header__link:hover {
  color: var(--color-brand);
}
.site-header__link--text {
  margin-right: 1rem;
  overflow: visible;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-transform: uppercase;
}
.site-header__icon {
  height: 32px;
  fill: currentColor;
}

@media (min-width: 640px) {
  .site-header {
    border-top-width: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-header__brand {
    transition: none;
  }
}

/* --- intro: the greeting on the home page ------------------------------- */

.intro {
  margin-top: 1rem;
  margin-bottom: 2rem;
  font-family: var(--font-serif);
}
.intro__inner {
  display: flex;
  flex-direction: column;
  max-width: var(--width-text);
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: var(--color-ink-soft);
}
.intro__avatar {
  display: none;
  width: 6rem;
  height: 6rem;
  margin-right: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
}
.intro__text {
  margin-bottom: 0.75rem;
}
.intro__hi {
  float: left;
  margin-right: 1rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 2.5rem;
}

@media (min-width: 640px) {
  .intro {
    margin-top: 2rem;
  }
  .intro__inner {
    flex-direction: row;
  }
  .intro__avatar {
    display: inline-block;
  }
  .intro__hi {
    font-size: 3rem;
    line-height: 1;
  }
}

/* --- page-header: centered title block (post, tag and notice pages) ----- */

.page-header {
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}
.page-header__tags {
  padding-bottom: 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.page-header__tag {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.11em;
  text-transform: uppercase;
}
.page-header__tag:hover {
  text-decoration: none;
}
.page-header__title {
  padding-bottom: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 2.25rem;
  letter-spacing: -0.025em;
}
.page-header__meta {
  font-style: italic;
  font-weight: 300;
  color: var(--color-ink-faint);
}

@media (min-width: 640px) {
  .page-header__title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}
@media (min-width: 768px) {
  .page-header__meta {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

/* --- post-list: heading plus a dated list of posts ---------------------- */

.post-list__heading {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: 0.025em;
  color: var(--color-accent);
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-line);
}
.post-list__item {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-line);
}
.post-list__date {
  width: 8rem;
  padding-bottom: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--color-ink-faint);
}
.post-list__link {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.11em;
}
.post-list__link:hover {
  text-decoration: none;
}
.post-list__empty {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  color: var(--color-ink-faint);
}

@media (min-width: 640px) {
  .post-list__heading {
    font-size: 1rem;
    line-height: 1.5rem;
  }
  .post-list__item {
    flex-direction: row;
  }
  .post-list__link {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
}

/* --- article: a single post page ----------------------------------------
   The rich-text body also carries `.post` (content styles, see post.css and
   highlight.css) and `.lexxy-content`. */

.article {
  font-family: var(--font-serif);
}
.article__body,
.article__comments,
.article__footer {
  max-width: var(--width-text);
  margin-left: auto;
  margin-right: auto;
}
.article__body {
  font-size: 1rem;
  line-height: 1.5rem;
}
.article__comments {
  margin-top: 2.5rem;
  font-size: 1rem;
  line-height: 1.5rem;
  text-align: center;
}
.article__footer {
  margin-top: 2rem;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.5rem;
  letter-spacing: 0.025em;
  color: var(--color-ink-soft);
  text-align: center;
  text-transform: uppercase;
  border-top: 2px solid var(--color-line-strong);
  border-bottom: 1px solid var(--color-line-strong);
}
.article__footer-on {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
}

@media (min-width: 640px) {
  .article__body {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}
@media (min-width: 768px) {
  .article__comments {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

/* --- author-card: avatar and bio under a post ---------------------------- */

.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--width-text);
  margin-top: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0.75rem;
  padding-bottom: 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5rem;
}
.author-card__figure {
  margin-bottom: 1rem;
  text-align: center;
}
.author-card__avatar {
  width: 6rem;
  border-radius: 9999px;
}
.author-card__body {
  line-height: 1.375;
  text-align: center;
}
.author-card__name {
  margin-bottom: 0.75rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .author-card__figure {
    margin-right: 2rem;
    margin-left: -1rem;
  }
}
@media (min-width: 768px) {
  .author-card {
    flex-direction: row;
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
  .author-card__figure,
  .author-card__body {
    text-align: left;
  }
  .author-card__body {
    line-height: 1.375;
  }
  .author-card__avatar {
    width: 8rem;
  }
}

/* --- site-footer ---------------------------------------------------------- */

.site-footer {
  margin-bottom: 4rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--color-ink-muted);
  text-align: center;
  border-top: 1px solid var(--color-line);
}
.site-footer__icons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto 2rem;
}
.site-footer__icon {
  height: 2rem;
}
.site-footer__credits {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.site-footer__nowrap {
  white-space: nowrap;
}

@media (min-width: 640px) {
  .site-footer {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
  .site-footer__icons {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
@media (min-width: 768px) {
  .site-footer__icon {
    height: 2.5rem;
  }
}

/* --- notice: not-found and error pages ------------------------------------ */

.notice {
  margin-top: 3rem;
  margin-bottom: 3rem;
  font-family: var(--font-serif);
  text-align: center;
}
.notice__text {
  margin-bottom: 0.75rem;
  color: var(--color-ink-soft);
}
