:root {
  --page-width: 40rem;
  --text: #333;
  --heading: #555;
  --muted: #767676;
  --link: #41656d;
  --rule: #e6e6e6;
  --code-bg: #f5f5f3;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-size: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.7;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: #23454c;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 4.45rem;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.96);
}

.site-header-inner,
.site-main {
  width: min(var(--page-width), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header-inner {
  min-height: 4.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-title {
  color: #111;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.55rem;
}

.site-nav a {
  color: var(--heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #111;
  text-decoration: underline;
}

.site-main {
  padding-block: 1.4rem 4rem;
}

.post {
  margin: 0 0 5.5rem;
}

.post-header h1,
.page-header h1 {
  margin: 0;
  padding-block: 1.4rem;
  color: var(--heading);
  font-size: 1.25rem;
  line-height: 1.45;
}

.post-header h1 a {
  color: inherit;
  text-decoration: none;
}

.post-header h1 a:hover,
.post-header h1 a:focus-visible {
  color: #222;
  text-decoration: underline;
}

.post-content,
.post-summary,
.page-content {
  overflow-wrap: anywhere;
}

.post-content > :first-child,
.post-summary > :first-child,
.page-content > :first-child {
  margin-top: 0;
}

p,
ul,
ol,
blockquote,
pre,
table,
figure {
  margin-block: 0 1.15rem;
}

h2,
h3,
h4 {
  margin: 2rem 0 0.8rem;
  color: var(--heading);
  line-height: 1.35;
}

h2 {
  font-size: 1.15rem;
}

h3 {
  font-size: 1rem;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
  border: 0;
}

figure {
  text-align: center;
}

figcaption,
figure > p:last-child {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

blockquote {
  margin-inline: 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--rule);
  color: #555;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 0.2rem;
  background: var(--code-bg);
  font-size: 0.86rem;
  line-height: 1.55;
}

code {
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

:not(pre) > code {
  padding: 0.1em 0.25em;
  border-radius: 0.18rem;
  background: var(--code-bg);
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

th,
td {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.post-meta {
  margin-top: 1.45rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}

.archive-list {
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  padding-block: 0.45rem;
  border-bottom: 1px solid var(--rule);
}

.archive-list time {
  color: var(--muted);
}

@media (max-width: 36rem) {
  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding-block: 0.85rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .site-main {
    padding-top: 0.6rem;
  }

  .post {
    margin-bottom: 4rem;
  }

  .archive-list li {
    display: block;
  }

  .archive-list time {
    display: block;
    margin-bottom: 0.15rem;
  }
}
