/* IBM Plex Mono is under the SIL Open Font License. See assets/fonts/OFL.txt. */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400-italic.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  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;
}

:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --fg: #1c1915;
  --muted: #514b42;
  --accent: #6e2f0c;
  --rule: #938a7a;
  --code-bg: #ece6da;
  --hover: #efe6d4;
  --selection: #e4d0ae;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141311;
    --fg: #ece6da;
    --muted: #b7b0a4;
    --accent: #f0c48a;
    --rule: #6a6258;
    --code-bg: #1e1c19;
    --hover: #2c2822;
    --selection: #4a3b28;
  }
}

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

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  font-variant-ligatures: none;
  overflow-wrap: break-word;
}

@media (max-width: 380px) {
  body {
    font-size: 17px;
  }
}

::selection {
  background: var(--selection);
  color: var(--fg);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--bg);
  color: var(--accent);
  padding: 0.4rem 0.65rem;
  z-index: 2;
}

.skip:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reading column: 68 characters of the monospace face. */
.page {
  width: min(68ch, calc(100% - 2.5rem));
  margin-inline: auto;
  padding-block: 4.25rem 3.25rem;
}

@media (max-width: 640px) {
  .page {
    width: min(68ch, calc(100% - 2.3rem));
    padding-block: 2.4rem 2.75rem;
  }
}

.ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nameblock {
  min-width: 0;
}

h1,
.name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.35;
}

.name a {
  color: inherit;
  text-decoration: none;
}

.name a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.updated {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.social {
  display: flex;
  flex: none;
  gap: 0.1rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--fg);
  text-decoration: none;
  border-radius: 0.45rem;
}

.social a:hover {
  color: var(--accent);
  background: var(--hover);
}

.social svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

section {
  margin-top: 2.85rem;
}

h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.05rem;
  font-size: 1em;
  font-weight: 500;
  line-height: 1.4;
}

h2 .mark {
  color: var(--accent);
  font-weight: 400;
}

h2::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  min-width: 1.25rem;
  background: var(--rule);
}

.prose p {
  margin: 0 0 1.15em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.writing {
  list-style: none;
  margin: 0;
  padding: 0;
}

.writing li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

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

.writing a {
  font-weight: 500;
}

.writing time {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule);
}

.clock {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.post h1 {
  margin: 1.7rem 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.35;
}

.post .meta {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body pre {
  margin: 0 0 1.15em;
}

.post-body h2 {
  margin: 2rem 0 0.8rem;
}

.post-body h3 {
  margin: 1.5rem 0 0.45rem;
  font-size: 1em;
  font-weight: 500;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4em;
}

.post-body li {
  margin: 0.25em 0;
}

.post-body li > ul,
.post-body li > ol {
  margin: 0.25em 0 0;
}

.post-body blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

.post-body pre {
  padding: 0.85rem 1rem;
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  line-height: 1.55;
}

.post-body code {
  font-family: inherit;
  font-size: 0.95em;
}

.post-body :not(pre) > code {
  background: var(--code-bg);
  padding: 0.05em 0.3em;
}

.post-body img {
  max-width: 100%;
  height: auto;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

.post-body a {
  overflow-wrap: anywhere;
}

@media print {
  a {
    text-decoration-color: currentColor;
  }
}
