@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,400..700;1,8..60,400..600&display=swap');

:root {
  --bg: #faf9f5;
  --surface: #f1efe8;
  --text: #181c24;
  --muted: #5a6270;
  --border: #dcd8cc;
  --accent: #0369a1;
  --accent-warm: #be123c;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1118;
    --surface: #151b26;
    --text: #e6ebf2;
    --muted: #94a0b3;
    --border: #242d3d;
    --accent: #38bdf8;
    --accent-warm: #fb7185;
  }
}

body {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.72;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(
    90deg,
    #e11d48 0%,
    #0284c7 35%,
    #4f46e5 65%,
    #9333ea 85%,
    transparent 100%
  );
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: top left;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease;
}

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

.strip {
  padding: 0.75rem 1.25rem 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

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

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

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

.masthead {
  padding-top: 3rem;
  padding-bottom: 1.75rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "avatar title"
    "avatar tagline";
  column-gap: 1.25rem;
  align-items: center;
}

.avatar {
  grid-area: avatar;
  width: 4.75rem;
  height: 4.75rem;
  margin: 0;
  border-radius: 50%;
}

.blog-title {
  grid-area: title;
  align-self: end;
  font-family: var(--font-sans);
  font-size: 2.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

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

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

.tagline {
  grid-area: tagline;
  align-self: start;
  margin: 0.25rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

body.post .masthead {
  padding-top: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

body.post .avatar {
  width: 3.25rem;
  height: 3.25rem;
}

body.post .blog-title {
  font-size: 1.3rem;
}

body.post .tagline {
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  .masthead {
    grid-template-columns: 1fr;
    grid-template-areas:
      "avatar"
      "title"
      "tagline";
    row-gap: 0.35rem;
    padding-top: 2rem;
  }

  .avatar {
    width: 4rem;
    height: 4rem;
    margin-bottom: 0.4rem;
  }
}

main {
  padding-bottom: 3.5rem;
}

.about {
  margin: 0.5rem 0 2.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 1.02rem;
}

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

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

.posts h2 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin: 0 0 0.25rem;
}

.post-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.post-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.post-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.empty,
.notice {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

.notice {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-warm);
  border-radius: 4px;
}

.post-header {
  margin: 2rem 0 2rem;
}

.post-header h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.65rem, 3.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.post-body h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.6rem;
}

.post-body h3 {
  font-size: 1.12rem;
  margin: 1.75rem 0 0.5rem;
}

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

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

.post-body li + li {
  margin-top: 0.35rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.15rem 0 0.15rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  width: 45%;
  margin: 2.5rem auto;
}

.receipt,
.colophon {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}

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

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