@font-face { font-family: "iA Writer Mono"; font-style: normal; font-display: swap; font-weight: 400; src: url("/assets/fonts/ia-writer-mono-regular.woff2") format("woff2"); }
@font-face { font-family: "iA Writer Mono"; font-style: normal; font-display: swap; font-weight: 700; src: url("/assets/fonts/ia-writer-mono-bold.woff2") format("woff2"); }
@font-face { font-family: "iA Writer Mono"; font-style: italic; font-display: swap; font-weight: 400; src: url("/assets/fonts/ia-writer-mono-italic.woff2") format("woff2"); }
@font-face { font-family: "iA Writer Mono"; font-style: italic; font-display: swap; font-weight: 700; src: url("/assets/fonts/ia-writer-mono-bold-italic.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --white: #faf5f6;
  --transwhite: #faf5f6b3;
  --moretranswhite: #efefef1a;
  --black: #252525;
  --transblack: #252525b3;
  --moretransblack: #2525251a;
  --gray: #6b6b6b;
  --highlight: #e5ffc3;
  --green: #24d05a;
  --pink: #eb4888;
  --blue: #10a2f5;
  --yellow: #e9bc3f;
  --paper: var(--white);
  --ink: var(--black);
  --glass: var(--transwhite);
  --shade: var(--moretransblack);
}

::selection { background: var(--highlight); color: var(--black); }
html, body {
  background: var(--paper);
  color: var(--ink);
  margin: auto;
  padding: 20px;
  max-width: 70ch;
  overflow-wrap: break-word;
  scroll-behavior: smooth;
}
html, body, button, code, input { font-family: "iA Writer Mono", monospace; }
body { font-size: 1rem; }
h1, strong, b { color: var(--ink); }
h1 { font-weight: 400; scroll-margin-top: 5rem; }
h2, h3, h4, h5, h6 { color: var(--gray); line-height: 1.1; }
h2 { font-weight: 400; }
h3 { text-align: center; }
a { color: var(--ink); text-underline-offset: .3ex; text-decoration-thickness: .3ex; text-decoration-color: var(--link-color, var(--pink)); }
a:nth-of-type(4n+2) { --link-color: var(--green); }
a:nth-of-type(4n+3) { --link-color: var(--blue); }
a:nth-of-type(4n) { --link-color: var(--yellow); }
a:visited { text-decoration-style: dotted; }
a:hover { text-decoration-style: solid; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
[hidden] { display: none !important; }
main:focus { outline: none; }

.site-header { position: relative; }
.header-section { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.header-frame { width: 350px; max-width: 100%; }
.site-title { font-size: 2rem; font-weight: 400; line-height: normal; margin: .67em 0; }
.site-subtitle { font-size: 1.5rem; font-weight: 400; color: var(--gray); line-height: 1.1; margin: .5em 0; white-space: pre-wrap; }
.img-frame { width: 200px; height: 200px; border-radius: 50%; margin: 10px 0; overflow: hidden; }
.img-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.site-nav { text-align: center; background: var(--glass); backdrop-filter: blur(1px); position: sticky; top: 0; z-index: 2; }
.site-nav a { display: inline-block; text-decoration: none; line-height: 20px; margin: 12px 0; padding: 12px 0; min-width: 44px; }
.site-nav a:not(:last-child) { padding-right: .75rem; }
.site-nav a.active, .site-nav a:hover { font-weight: 700; text-decoration: underline; text-decoration-thickness: .3ex; }
main { line-height: 1.6; }

.recent-posts { padding-top: 1.5rem; }
.recent-posts h2 { font-size: 1.17em; font-weight: 700; text-align: center; margin: 1em 0; }
ul.posts-list, ul.year-list { padding: 0; list-style: none; }
.post { margin: 0 0 30px; }
.post .title { font-size: 1.3em; }
.post:nth-child(4n+1) .title { --link-color: var(--pink); }
.post:nth-child(4n+2) .title { --link-color: var(--green); }
.post:nth-child(4n+3) .title { --link-color: var(--blue); }
.post:nth-child(4n) .title { --link-color: var(--yellow); }
time { color: var(--gray); font-style: italic; }
.post time { white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; }
.tags.center, .year-list { max-width: 50ch; margin: 0 auto; }
.tag { color: var(--ink); margin: auto 10px; font-size: .8rem; display: inline-block; }
.tag:hover { font-weight: 700; }
.tag.posty { margin-left: 0; margin-right: 10px; }
.tag-title { color: var(--ink); font-weight: 400; }
.all-tags { padding-top: 2.5rem; line-height: 1.6; }
.all-tags h2 { color: var(--ink); font-size: 1.17em; text-align: center; margin: 1em 0; }
.center, .subscribe { text-align: center; }
.year-heading { font-size: 2rem; font-weight: 400; color: var(--ink); line-height: normal; margin: .67em 0; scroll-margin-top: 6rem; }
hr { border: 0; border-top: 1px solid var(--gray); width: 75%; margin: 1rem auto; }

article :not(.article-title) { line-height: 1.8; }
.article-title { font-size: 2em; margin: .25em 0; }
.blog-post { font-size: clamp(1rem, .96rem + .22vw, 1.125rem); }
.blog-post > * + * { margin-block-start: 1em; }
img { max-width: 100%; height: auto; }
figure { margin: 1em 0; }
.hero-image { display: block; margin: auto; }
.image-zoom { border: 0; background: transparent; padding: 0; margin: 0; max-width: 100%; display: block; cursor: zoom-in; }
.image-zoom img { display: block; }
.blog-post iframe { border: 0; width: 100%; aspect-ratio: 16 / 9; }
table { font-size: 1rem; }
.blog-post table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.blog-post table, .blog-post th, .blog-post td { border: 1px solid var(--gray); line-height: 1.4; }
.blog-post th, .blog-post td { padding: 4px; }
.blog-post thead { background: var(--shade); }
code { background: var(--shade); padding: 2px 5px; font-weight: 700; }
pre { background: var(--shade); tab-size: 2; padding: 1rem; overflow: auto; }
pre > code { all: unset; }
blockquote { background: var(--shade); border-left: .5ex solid var(--gray); border-radius: 0 10px 10px 0; margin: 0; padding: 20px; font-style: italic; }
blockquote p { margin: 0; }
blockquote > ul:last-child { text-align: right; margin: 0; padding: 0; list-style: none; }
blockquote > ul:last-child > li::before { content: "— "; }

.archive-search { margin: 1rem 0; }
summary { cursor: pointer; padding: .5rem 0; }
label { display: block; margin-top: .5rem; }
input[type="search"] { box-sizing: border-box; width: 100%; font-size: 1rem; min-height: 44px; padding: .5rem; color: var(--ink); background: var(--paper); border: 1px solid var(--gray); border-radius: 0; }
#search-status { font-size: .875rem; }
.notes { margin-top: 2rem; }
.notes details { padding: .5rem 0; border-bottom: 1px solid var(--gray); scroll-margin-top: 6rem; }
.notes details:target { background: var(--shade); }
.annotation { text-decoration-style: dotted; }
.page-heading { text-align: left; }
footer { text-align: center; padding: 25px; font-size: .8rem; }
.skip { position: fixed; top: -100px; left: 1rem; padding: .75rem; background: var(--paper); z-index: 5; }
.skip:focus { top: 1rem; }
.back-to-top { position: fixed; bottom: 20px; right: 20px; border-radius: .5em; padding: .5em; min-height: 28px; align-content: center; background: var(--glass); backdrop-filter: blur(1px); z-index: 3; }
body:has(dialog[open]) { overflow: hidden; }
dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--gray); border-radius: 10px; max-width: calc(100vw - 4rem); max-height: calc(100dvh - 4rem); }
dialog::backdrop { backdrop-filter: blur(2px); background: #0005; }
dialog img { display: block; max-height: 80dvh; max-width: 100%; margin: auto; object-fit: contain; }
dialog button { font: inherit; color: var(--ink); background: var(--shade); cursor: pointer; border: 0; min-height: 44px; padding: .5rem 1rem; display: block; margin: 0 auto 10px; }

@media (width <= 650px) {
  .site-nav { padding: .75rem 0 0; }
  .site-nav a { margin: 0 0 .75rem; }
}
@media (prefers-color-scheme: dark) {
  :root { --gray: #a4a4a4; --paper: var(--black); --ink: var(--white); --glass: var(--transblack); --shade: var(--moretranswhite); }
  ::selection { color: var(--white); background: #0f0f0f; }
  .tag { color: var(--gray); }
  .tags.center .tag { color: var(--white); }
}
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
}
