@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@500;600;700;800&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700&display=swap");

:root {
  color-scheme: light dark;
  --paper: #f7f4ed;
  --surface: #eee9df;
  --ink: #202933;
  --muted: #65707a;
  --line: #d7d2c7;
  --accent: #bd5136;
  --link: #983c28;
  --code: #e9e4da;
  --strip-bg: #1c2632;
  --strip-ink: #ece8df;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12171d;
    --surface: #1a222a;
    --ink: #ece8de;
    --muted: #a4adb5;
    --line: #35404a;
    --accent: #ff9878;
    --link: #ffad91;
    --code: #0c1116;
    --strip-bg: #0b1015;
    --strip-ink: #e7e3da;
  }
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.075rem/1.72 var(--serif);
  font-kerning: normal;
}

::selection {
  background: #e8b29f;
  color: #17202a;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 1.2rem;
  padding: 0.62rem max(1.1rem, calc((100vw - 43rem) / 2));
  border: 0;
  border-bottom: 2px solid var(--accent);
  background: var(--strip-bg);
  color: var(--strip-ink);
  font: 600 0.67rem/1.5 var(--sans);
  letter-spacing: 0.035em;
}

.strip span {
  opacity: 0.7;
  text-align: center;
}

.strip a {
  color: inherit;
  text-decoration: none;
  opacity: 0.86;
}

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

.masthead,
main,
.colophon {
  width: 100%;
  max-width: 45rem;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 1.6rem);
}

.masthead {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  column-gap: 1.15rem;
  align-items: center;
  padding-top: clamp(3.2rem, 8vw, 5.2rem);
  padding-bottom: 2.4rem;
}

.avatar {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  margin: 0;
  border-radius: 24%;
}

.blog-title {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(2rem, 7vw, 3.15rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

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

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

.tagline {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  max-width: 31rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.04rem;
  font-style: italic;
  line-height: 1.45;
}

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

.about {
  margin: 0 0 3.2rem;
  padding: 1.15rem 1.35rem 1.3rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}

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

.about > :last-child {
  margin-bottom: 0;
}

.about p {
  margin: 0.8rem 0;
}

.about a,
.post-body a,
.receipt a {
  color: var(--link);
  text-decoration-color: var(--accent);
}

.about a:hover,
.post-body a:hover,
.receipt a:hover {
  text-decoration-thickness: 0.13em;
}

.about h2,
.about h3 {
  font-family: var(--sans);
  letter-spacing: -0.02em;
}

.posts h2 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font: 700 0.7rem/1.4 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.posts h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.post-list {
  counter-reset: entries;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  counter-increment: entries;
  display: grid;
  grid-template-columns: 2.3rem minmax(0, 1fr);
  gap: 0.18rem 0.7rem;
  padding: 1.05rem 0 1.1rem;
  border-bottom: 1px solid var(--line);
}

.post-list li::before {
  content: counter(entries, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-top: 0.2rem;
  color: var(--accent);
  font: 500 0.7rem/1.5 var(--mono);
  letter-spacing: 0.04em;
}

.post-link {
  grid-column: 2;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.post-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

time {
  color: var(--muted);
  font: 500 0.7rem/1.5 var(--sans);
  letter-spacing: 0.055em;
}

.post-list time {
  grid-column: 2;
}

.empty {
  margin: 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-style: italic;
}

.post .masthead {
  grid-template-columns: 3.35rem minmax(0, 1fr);
  column-gap: 0.95rem;
  padding-top: 2.4rem;
  padding-bottom: 2.2rem;
}

.post .avatar {
  width: 3.35rem;
  height: 3.35rem;
}

.post .blog-title {
  font-size: 1.4rem;
  letter-spacing: -0.035em;
}

.post .tagline {
  margin-top: 0.35rem;
  font-size: 0.93rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.post-header h1 {
  margin: 0 0 0.85rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 6.5vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.032em;
}

.post-body {
  font-size: 1.08rem;
}

.post-body p {
  margin: 0 0 1.3rem;
}

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

.post-body > :last-child {
  margin-bottom: 0;
}

.post-body h2 {
  margin: 2.7rem 0 0.75rem;
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.post-body h3 {
  margin: 2.1rem 0 0.65rem;
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
}

.post-body h4 {
  margin: 1.8rem 0 0.55rem;
  color: var(--muted);
  font: 700 0.75rem/1.5 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.35rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin: 0.35rem 0;
  padding-left: 0.15rem;
}

.post-body li::marker {
  color: var(--accent);
}

strong {
  font-weight: 650;
}

blockquote {
  margin: 1.8rem 0;
  padding: 0.1rem 0 0.1rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-size: 1.1em;
  font-style: italic;
}

blockquote p {
  margin: 0.65rem 0;
}

code {
  padding: 0.12em 0.32em;
  border-radius: 0.2em;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.86em;
}

pre {
  max-width: 100%;
  margin: 1.6rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--code);
  font: 400 0.82rem/1.65 var(--mono);
  tab-size: 2;
}

pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
}

hr {
  width: 4rem;
  margin: 2.6rem auto;
  border: 0;
  border-top: 2px solid var(--accent);
}

.notice {
  margin-top: 2rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: 500 0.82rem/1.55 var(--sans);
}

.receipt {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 0.72rem/1.6 var(--sans);
}

.colophon {
  padding-top: 1.15rem;
  padding-bottom: 2.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 0.72rem/1.6 var(--sans);
}

.colophon p {
  margin: 0;
}

@media (max-width: 38rem) {
  .strip span {
    order: 3;
    flex-basis: 100%;
    text-align: left;
  }
}

@media (max-width: 24rem) {
  .home .masthead {
    grid-template-columns: 3.1rem minmax(0, 1fr);
    column-gap: 0.8rem;
  }

  .home .avatar {
    width: 3.1rem;
    height: 3.1rem;
  }

  .home .blog-title {
    font-size: 1.75rem;
  }

  .tagline {
    font-size: 0.95rem;
  }
}
