:root {
  color-scheme: light dark;
  --paper: #fbf7ef;
  --ink: #211c19;
  --muted: #756b60;
  --line: rgba(72, 55, 38, .22);
  --panel: rgba(255, 252, 246, .72);
  --accent: #9b4d2e;
  --accent-2: #245f73;
  --glow: rgba(155, 77, 46, .16);
  --radius: 1.15rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151413;
    --ink: #eee4d5;
    --muted: #b4a797;
    --line: rgba(238, 228, 213, .20);
    --panel: rgba(32, 29, 26, .72);
    --accent: #f0a06e;
    --accent-2: #8fc9d8;
    --glow: rgba(240, 160, 110, .12);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 1.05rem/1.75 Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, var(--glow), transparent 32rem),
    radial-gradient(circle at 86% 24%, rgba(36, 95, 115, .10), transparent 28rem),
    linear-gradient(180deg, var(--paper), var(--paper));
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-2);
  text-decoration-color: color-mix(in srgb, var(--accent-2), transparent 55%);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

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

.strip {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem 1rem;
  padding: .55rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper), transparent 8%);
  backdrop-filter: blur(10px);
  font: .78rem/1.4 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--muted);
}

.strip a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.masthead,
main,
.colophon {
  max-width: 44rem;
  margin: 0 auto;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.masthead {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem 1.1rem;
  padding-top: clamp(2rem, 7vw, 4.8rem);
  padding-bottom: 1.4rem;
}

.avatar {
  display: block;
  width: clamp(4.2rem, 14vw, 6.2rem);
  height: clamp(4.2rem, 14vw, 6.2rem);
  border-radius: 28%;
  box-shadow: 0 .7rem 2rem rgba(0,0,0,.16);
}

.blog-title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.25rem, 8vw, 4.4rem);
  line-height: .95;
  letter-spacing: -.055em;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
}

.blog-title a {
  color: var(--ink);
  text-decoration: none;
}

.tagline {
  grid-column: 2;
  margin: -.35rem 0 0;
  max-width: 31rem;
  color: var(--muted);
  font: .98rem/1.45 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  padding-bottom: 3.5rem;
  overflow-wrap: anywhere;
}

.about,
.posts,
article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.055);
}

.about,
.posts {
  padding: clamp(1.1rem, 4vw, 1.6rem);
}

.about {
  position: relative;
}

.about::before {
  content: "¶";
  float: right;
  margin: -.35rem 0 .5rem 1rem;
  color: color-mix(in srgb, var(--accent), transparent 35%);
  font-size: 3rem;
  line-height: 1;
}

.posts { margin-top: 1rem; }

article {
  padding: clamp(1.15rem, 4vw, 2rem);
}

p { margin: 1rem 0; }

h1, h2, h3, h4 {
  color: var(--ink);
  letter-spacing: -.025em;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.08;
  margin: 1rem 0 .35rem;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.2;
  margin: 2rem 0 .55rem;
}

h3, h4 {
  font-size: 1.08rem;
  margin: 1.5rem 0 .45rem;
}

.about h2:first-child,
.posts h2:first-child,
.post-header h1:first-child {
  margin-top: 0;
}

time {
  color: var(--muted);
  font: .82rem/1.4 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .02em;
}

.post-list {
  list-style: none;
  margin: .3rem 0 0;
  padding: 0;
}

.post-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .2rem 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list li:last-child { border-bottom: 0; }

.post-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: color-mix(in srgb, var(--accent), transparent 55%);
}

.empty,
.notice {
  color: var(--muted);
  font-style: italic;
}

blockquote {
  margin: 1.35rem 0;
  padding: .1rem 0 .1rem 1rem;
  border-left: .25rem solid var(--accent);
  color: color-mix(in srgb, var(--ink), var(--muted) 20%);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .92em;
  background: color-mix(in srgb, var(--muted), transparent 86%);
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: .35rem;
  padding: .05rem .25rem;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: color-mix(in srgb, var(--ink), transparent 93%);
  font-size: .88rem;
  line-height: 1.55;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.2rem auto;
  width: 60%;
}

.receipt,
.colophon {
  color: var(--muted);
  font: .8rem/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.receipt {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.colophon {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  padding-bottom: 3rem;
}

@media (max-width: 34rem) {
  .masthead {
    grid-template-columns: 1fr;
  }

  .tagline {
    grid-column: 1;
    margin-top: .15rem;
  }

  .strip {
    position: static;
  }
}
