@font-face {
  font-family: inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-latin-400.woff2) format("woff2");
}
@font-face {
  font-family: inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-latin-700.woff2) format("woff2");
}
:root {
  --bg: #fafaf9;
  --text: #1c1917;
  --text-secondary: #78716c;
  --link: #7226af;
  --link-hover: #5d208f;
  --border: #e7e5e4;
  --code-bg: #f5f5f4;
  --code-text: #44403c;
  --code-block-bg: #1e1e1e;
  --code-block-text: #d4d4d4;
  --tag-bg: #f5f5f4;
  --tag-text: #44403c;
  --blockquote-border: #d6d3d1;
  --selection-bg: #7226af;
  --selection-text: #fff;
  --hover-bg: #f5f5f4;
  --accent: #7226af;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #1c1917;
  --text: #fafaf9;
  --text-secondary: #a8a29e;
  --link: #fad660;
  --link-hover: #e9cf7b;
  --border: #44403c;
  --code-bg: #292524;
  --code-text: #d6d3d1;
  --code-block-bg: #292524;
  --code-block-text: #d6d3d1;
  --tag-bg: #292524;
  --tag-text: #d6d3d1;
  --blockquote-border: #57534e;
  --selection-bg: #fad660;
  --selection-text: #1c1917;
  --hover-bg: #292524;
  --accent: #fad660;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-y: scroll;
}
body {
  font-family:
    inter,
    -apple-system,
    BlinkMacSystemFont,
    segoe ui,
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    helvetica neue,
    sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
::selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}
main {
  flex: 1;
  padding: 2.5rem 0 2rem;
}
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.theme-toggle:focus-visible,
.search-link:focus-visible,
.scroll-top:focus-visible {
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2,
h3,
h4 {
  font-family:
    iowan old style,
    palatino linotype,
    Palatino,
    Georgia,
    times new roman,
    serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  text-wrap: pretty;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}
h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
h3 {
  font-size: 1.3rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
p {
  margin-bottom: 1.25rem;
}
strong {
  font-weight: 700;
}
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1000;
  animation: progress-grow linear;
  animation-timeline: scroll();
}
@keyframes progress-grow {
  to {
    transform: scaleX(1);
  }
}
.no-scroll-timeline .progress-bar {
  animation: none;
}
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 2px solid var(--accent);
  padding: 0.75rem 0;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}
.header.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 8%);
}
[data-theme="dark"] .header.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.actual-site-title {
  font-size: 1.4rem;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-family:
    iowan old style,
    palatino linotype,
    Palatino,
    Georgia,
    times new roman,
    serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}
.site-title:hover {
  color: var(--text);
  text-decoration: none;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.header-nav a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.15s ease;
}
.header-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.theme-toggle {
  background: 0 0;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  border-radius: 4px;
}
.theme-toggle:hover {
  color: var(--text);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="light"] .icon-sun {
  display: none;
}
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.hero-image {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
  filter: grayscale(100%);
  transition:
    filter 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 5px var(--border);
}
.hero-image:hover {
  filter: grayscale(0%);
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 5px var(--accent);
}
.hero-name {
  font-size: 2.5rem;
  margin-bottom: 0.4rem;
  line-height: 1.15;
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.hero-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}
.hero-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero-links a {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--accent);
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.hero-links a:hover {
  color: var(--link);
  border-color: var(--link);
  text-decoration: none;
}
.ask-ai {
  margin-top: 1.5rem;
  text-align: center;
}
.ask-ai-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ask-ai-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ask-ai-btn {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background-color 0.15s ease;
}
.ask-ai-btn:hover {
  border-color: var(--text);
  color: var(--text);
  background-color: var(--hover-bg);
}
.recent-posts {
  padding-bottom: 2rem;
}
.recent-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.recent-header h2 {
  margin: 0;
  font-size: 1.15rem;
}
.view-all {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.view-all:hover {
  color: var(--link);
  text-decoration: none;
}
.page-title {
  font-size: 2.25rem;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.post-entry {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.post-entry:hover {
  border-color: var(--text-secondary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 4%);
}
[data-theme="dark"] .post-entry:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.post-entry-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.post-entry-link:hover {
  text-decoration: none;
}
.post-entry-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.post-entry-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}
.post-meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.post-meta span + span::before {
  content: "\b7";
  margin: 0 0.4rem;
}
.post-header {
  margin-bottom: 2rem;
}
.post-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.post-header {
  margin-top: 0.75rem;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.post-content {
  margin-bottom: 2rem;
}
.post-content > * + * {
  margin-top: 1.25rem;
}
.post-content h2 {
  margin-top: 2.5rem;
}
.post-content h3 {
  margin-top: 2rem;
}
.post-content h4 {
  margin-top: 1.5rem;
}
.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.post-content li {
  margin-bottom: 0.25rem;
}
.post-content li > ul,
.post-content li > ol {
  margin-top: 0.25rem;
  margin-bottom: 0;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.post-content a {
  text-decoration-line: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent);
}
.post-content a:hover {
  text-decoration-color: var(--link);
}
.post-content a[href^="http"]::after {
  content: " \2197";
  font-size: 0.75em;
  vertical-align: super;
  opacity: 0.5;
}
.toc {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}
.toc summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  user-select: none;
}
.toc summary::-webkit-details-marker {
  margin-right: 0.5rem;
}
.toc nav {
  margin-top: 0.75rem;
}
.toc ul {
  list-style: none;
  padding-left: 0;
}
.toc li {
  margin: 0.3rem 0;
}
.toc li li {
  padding-left: 1rem;
}
.toc a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.toc a:hover {
  color: var(--link);
  text-decoration: none;
}
.series-nav {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}
.series-label {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.series-nav ol {
  padding-left: 1.25rem;
  margin: 0;
}
.series-nav li {
  margin: 0.3rem 0;
}
.series-nav li a {
  color: var(--text-secondary);
}
.series-nav li a:hover {
  color: var(--link);
}
.series-nav li.current {
  color: var(--text);
  font-weight: 700;
}
.related-posts {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related-posts h2 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.related-entry {
  display: block;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}
.related-entry:hover {
  background-color: var(--hover-bg);
  border-color: var(--text-secondary);
  text-decoration: none;
}
.related-entry h3 {
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
  line-height: 1.4;
  color: var(--text);
}
.related-entry .post-meta {
  font-size: 0.78rem;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.post-tags a {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.post-tags a:hover {
  background: var(--border);
  text-decoration: none;
}
code {
  font-family:
    sfmono-regular,
    Consolas,
    liberation mono,
    Menlo,
    Courier,
    monospace;
  font-size: 0.88em;
}
:not(pre) > code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
.highlight {
  position: relative;
}
pre {
  background: var(--code-block-bg);
  color: var(--code-block-text);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
pre code {
  background: 0 0;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 0.88em;
}
.code-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  color: var(--code-block-text);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.highlight:hover .code-copy {
  opacity: 1;
}
.code-copy:hover {
  background: rgba(255, 255, 255, 0.2);
}
blockquote {
  border-left: 3px solid var(--blockquote-border);
  padding-left: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.25rem;
}
blockquote p {
  margin-bottom: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 700;
  border-bottom-width: 2px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 0;
  font-size: 0.9rem;
}
.pagination a {
  color: var(--link);
}
.pagination .disabled {
  color: var(--text-secondary);
  opacity: 0.5;
}
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.post-nav a {
  max-width: 48%;
}
.post-nav .prev::before {
  content: "\2190 ";
}
.post-nav .next::after {
  content: " \2192";
}
.post-nav .next {
  margin-left: auto;
  text-align: right;
}
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    background-color 0.3s ease,
    color 0.15s ease;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 8%);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-top:hover {
  color: var(--text);
  border-color: var(--text-secondary);
}
[data-theme="dark"] .scroll-top {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.scroll-top svg {
  width: 18px;
  height: 18px;
}
.terms-list {
  list-style: none;
}
.terms-list li {
  display: inline-block;
  margin: 0.25rem;
}
.terms-list a {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.terms-list a:hover {
  background: var(--border);
  text-decoration: none;
}
.terms-count {
  color: var(--text-secondary);
  font-size: 0.8em;
}
.not-found {
  text-align: center;
  padding: 4rem 0;
}
.not-found h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.not-found p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background-color 0.3s ease;
}
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  .container {
    padding: 0 1.25rem;
  }
  h1,
  .post-title {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.35rem;
  }
  h3 {
    font-size: 1.15rem;
  }
  .page-title {
    font-size: 1.75rem;
  }
  .hero {
    padding: 2.5rem 0 2rem;
  }
  .hero-name {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .post-nav {
    flex-direction: column;
  }
  .post-nav a {
    max-width: 100%;
  }
  .post-nav .next {
    text-align: left;
  }
  .scroll-top {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  .container {
    padding: 0 1rem;
  }
  h1,
  .post-title {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.2rem;
  }
  h3 {
    font-size: 1.05rem;
  }
  .site-title {
    font-size: 1rem;
  }
  .header-nav {
    gap: 0.75rem;
  }
  .header-nav a {
    font-size: 0.8rem;
  }
  .hero {
    padding: 2rem 0 1.5rem;
  }
  .hero-image {
    width: 80px;
    height: 80px;
  }
  .hero-name {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-bio {
    font-size: 0.9rem;
  }
  .hero-links {
    gap: 1rem;
  }
  .hero-links a {
    font-size: 0.82rem;
  }
  .ask-ai-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
  .post-entry {
    padding: 1rem;
  }
  .post-entry-title {
    font-size: 1.1rem;
  }
  .post-entry-summary {
    font-size: 0.9rem;
  }
  .toc,
  .series-nav {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
  .toc li li {
    padding-left: 0.75rem;
  }
  .series-nav ol {
    padding-left: 1rem;
  }
  pre {
    padding: 0.75rem 1rem;
    font-size: 0.82em;
  }
  #searchInput {
    font-size: 16px;
  }
}
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  .hero-name {
    font-size: 1.5rem;
  }
  .hero-image {
    width: 72px;
    height: 72px;
  }
  .hero-bio {
    font-size: 0.88rem;
  }
  .ask-ai-buttons {
    flex-direction: column;
    align-items: center;
  }
  .ask-ai-btn {
    width: 60%;
  }
  .post-entry {
    padding: 0.75rem;
    border-radius: 6px;
  }
  .scroll-top {
    bottom: 1rem;
    right: 1rem;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding: 1.5rem 0 1rem;
  }
  .hero-image {
    width: 64px;
    height: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
@media print {
  .header,
  .footer,
  .theme-toggle,
  .search-link,
  .post-nav,
  .pagination,
  .post-tags,
  .toc,
  .series-nav,
  .related-posts,
  .scroll-top,
  .progress-bar,
  .code-copy,
  .hero-links,
  .ask-ai {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  pre {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
