/* tammam.io: the AstroPaper look of the original site, as plain CSS.
   Colors are "r, g, b" triples so any of them can take an alpha. */

@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-500.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-mono-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/ibm-plex-mono-700.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-400-italic.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: italic; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-mono-600-italic.woff2) format("woff2"); }

:root,
html[data-theme="light"] {
  --color-fill: 255, 255, 255;
  --color-text-base: 40, 39, 40;
  --color-accent: 0, 108, 172;
  --color-card: 230, 230, 230;
  --color-card-muted: 205, 205, 205;
  --color-border: 124, 173, 255;
  color-scheme: light;
}
html[data-theme="dark"] {
  --color-fill: 32, 33, 36;
  --color-text-base: 230, 230, 230;
  --color-accent: 120, 198, 250;
  --color-card: 63, 75, 90;
  --color-card-muted: 89, 107, 129;
  --color-border: 59, 70, 85;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, ::before, ::after { box-sizing: border-box; border: 0 solid rgb(var(--color-border)); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; overflow-y: scroll; }
body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  background: rgb(var(--color-fill));
  color: rgb(var(--color-text-base));
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p, ul, ol, figure, blockquote, pre { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: inherit; }
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; }
hr { height: 0; color: inherit; border-top-width: 1px; margin: 0; }
::selection { background: rgba(var(--color-accent), 0.7); color: rgb(var(--color-fill)); }
a, section, button { outline-offset: 1px; }
a:focus-visible, section:focus-visible, button:focus-visible { outline: 2px dashed rgb(var(--color-accent)); text-decoration: none; }

svg { display: inline-block; height: 1.5rem; width: 1.5rem; fill: rgb(var(--color-text-base)); vertical-align: middle; }
.group:hover svg { fill: rgb(var(--color-accent)); }
svg.icon-tabler {
  height: 1.5rem; width: 1.5rem; transform: scale(1.25);
  fill: transparent; stroke: currentColor; stroke-width: 2; opacity: 0.9;
}
.group:hover svg.icon-tabler { fill: transparent; }
#sun-svg, html[data-theme="dark"] #moon-svg { display: none; }
#moon-svg, html[data-theme="dark"] #sun-svg { display: block; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
.display-none { display: none; }

::-webkit-scrollbar { width: 0.75rem; }
::-webkit-scrollbar-track { background: rgb(var(--color-fill)); }
::-webkit-scrollbar-thumb { background: rgb(var(--color-card)); }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--color-card-muted)); }

/* ---------- header ---------- */
#skip-to-content {
  position: absolute; top: -100%; left: 4rem; z-index: 50;
  background: rgb(var(--color-accent)); color: rgb(var(--color-fill));
  padding: 0.5rem 0.75rem; transition: top 150ms;
}
#skip-to-content:focus { top: 1rem; }
.nav-container { margin: 0 auto; display: flex; max-width: 64rem; flex-direction: column; align-items: center; justify-content: space-between; }
.top-nav-wrap { position: relative; display: flex; width: 100%; align-items: flex-start; justify-content: space-between; padding: 1rem; }
.logo { position: absolute; padding: 0.25rem 0; font-weight: 600; }
.logo-mark { display: block; font-size: 2.25rem; line-height: 2.5rem; }
#nav-menu { display: flex; width: 100%; flex-direction: column; align-items: center; background: rgb(var(--color-fill)); }
.hamburger-menu { align-self: flex-end; padding: 0.5rem; }
.hamburger-menu svg { transform: scale(1.25); fill: none; }
#menu-items { margin-top: 1rem; width: 11rem; }
#menu-items li { display: flex; align-items: center; justify-content: center; }
#menu-items li a { width: 100%; padding: 0.75rem 1rem; text-align: center; font-weight: 500; }
#menu-items li a:hover { color: rgb(var(--color-accent)); }
#menu-items li a.rss-link { width: auto; }
#nav-menu a.active { text-decoration: underline wavy; text-decoration-thickness: 2px; text-underline-offset: 4px; }
#nav-menu button { padding: 0.25rem; }
#nav-menu button svg:hover { fill: rgb(var(--color-accent)); }
#theme-btn { padding: 0.75rem; }
#theme-btn svg { transform: scale(1.25); transition: transform 150ms; }
#theme-btn svg:hover { transform: scale(1.25) rotate(12deg); }
.menu-icon line { transition: opacity 75ms ease-in-out; }
.menu-icon .close { opacity: 0; }
.menu-icon.is-active .line { opacity: 0; }
.menu-icon.is-active .close { opacity: 1; }

/* ---------- shared pieces ---------- */
.hr { padding: 0.5rem 1rem; }
.hr hr { border-top: 1px solid rgb(var(--color-border)); }
.hr-flush { display: none; }

.social-icons { flex-wrap: wrap; justify-content: center; gap: 0.25rem; }
.social-icons.centered { display: flex; }
.animate-link-button { display: inline-block; padding: 0.5rem; transition: transform 150ms; }
.animate-link-button:hover { transform: rotate(6deg); }
.animate-link-button a:hover { color: rgb(var(--color-accent)); }

.newsletter-embed { margin: 0; border-radius: 0; background-color: transparent; color-scheme: normal; }

.datetime { display: flex; align-items: center; gap: 0.5rem; opacity: 0.8; }
.datetime svg { transform: scale(0.9); }
.datetime time { font-style: italic; font-size: 0.875rem; line-height: 1.25rem; }
.datetime-lg { margin: 0.5rem 0; }
.datetime-lg svg { transform: none; }
.datetime-lg time { font-size: 1rem; line-height: 1.5rem; }

.all-btn-wrapper { margin: 2rem 0; text-align: center; }
.all-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; }
.all-btn:hover { color: rgb(var(--color-accent)); }

/* ---------- post cards ---------- */
.post-card {
  margin: 1.5rem 0; border-radius: 0.5rem;
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.post-card:hover { transform: scale(1.02); box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.post-card-inner { display: flex; flex-direction: column; }
.post-card img { border-radius: 0.5rem; }
.post-card-body { flex-grow: 1; width: 100%; margin-top: 1rem; }
.post-card-title { font-size: 1.125rem; line-height: 1.75rem; font-weight: 700; color: rgb(var(--color-accent)); }
.post-card-title:hover { text-decoration: underline; }
.post-card-body p { padding: 0.25rem 0; }
.divide > * + * { border-top: 1px solid rgba(var(--color-border), 0.4); }

/* ---------- home ---------- */
.home-main { margin: 0 auto; width: 100%; max-width: 64rem; padding: 0 1rem; }
#hero { padding-bottom: 1.5rem; }
#hero p { margin: 0.5rem 0; }
.intro-row { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.75rem; }
.social-wrapper { margin-top: 1rem; display: flex; flex-direction: column; }
.newsletter-home { margin-top: 0.75rem; }
.wrap-4xl { margin: 0 auto; width: 100%; max-width: 56rem; padding: 0 0.5rem; }
.home-section { padding: 3rem 0 1.5rem; }
.home-section > h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: 0.025em; }
.books-intro { margin: 0.25rem 0 1rem; font-size: 0.875rem; line-height: 1.25rem; color: rgba(var(--color-text-base), 0.5); }
.books-list { display: flex; flex-direction: column; gap: 0.75rem; }
.home-book-card {
  display: flex; align-items: center; gap: 1rem; border-radius: 0.5rem; padding: 1rem;
  border: 1px solid rgba(var(--color-border), 0.4); transition: transform 300ms, border-color 300ms, box-shadow 300ms;
}
.home-book-card:hover { border-color: rgba(var(--color-accent), 0.4); transform: translateX(4px); box-shadow: 0 4px 20px -8px rgba(var(--color-accent), 0.12); }
.home-book-cover { flex-shrink: 0; width: 3rem; height: 3.5rem; border-radius: 0.375rem; display: flex; align-items: center; justify-content: center; }
svg.home-book-icon { width: 1.5rem; height: 1.5rem; fill: none; color: rgba(255, 255, 255, 0.8); }
.group:hover svg.home-book-icon, .group:hover svg.book-icon { fill: none; }
.home-book-info { flex: 1; min-width: 0; }
.home-book-title { font-size: 1rem; line-height: 1.5rem; font-weight: 500; transition: color 200ms; }
.home-book-card:hover .home-book-title { color: rgb(var(--color-accent)); }
.home-book-desc {
  margin-top: 0.125rem; font-size: 0.75rem; line-height: 1rem; color: rgba(var(--color-text-base), 0.8);
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
}
svg.home-book-arrow { width: 1.25rem; height: 1.25rem; flex-shrink: 0; fill: rgba(var(--color-text-base), 0.3); transition: transform 200ms, fill 200ms; }
.home-book-card:hover svg.home-book-arrow { fill: rgb(var(--color-accent)); transform: translateX(0.25rem); }

/* ---------- section pages (blog, about) ---------- */
.page-wrap { margin: 0 auto; width: 100%; max-width: 64rem; }
.breadcrumb { margin: 1rem auto 0.5rem; width: 100%; max-width: 72rem; padding: 0 1rem; }
.breadcrumb li { display: inline; margin-right: 0.5rem; }
.breadcrumb a { text-transform: capitalize; opacity: 0.7; margin-right: 0.5rem; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb span { opacity: 0.7; }
.page-main { width: 100%; padding: 0 1rem 3rem; }
.page-main > h1 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.page-desc { margin: 0.5rem 0 1.5rem; font-style: italic; }

/* ---------- books page ---------- */
.books-main { margin: 0 auto; width: 100%; max-width: 64rem; padding: 0 1rem 4rem; }
.books-hero { padding: 3rem 0 2.5rem; }
.books-title { font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; animation: fade-in 0.5s ease-out; }
.books-subtitle { margin-top: 1rem; max-width: 42rem; line-height: 1.625; color: rgba(var(--color-text-base), 0.6); animation: fade-in 0.5s ease-out 0.1s both; }
.books-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.books-footer { margin-top: 4rem; text-align: center; animation: fade-in 0.5s ease-out 0.4s both; }
.books-footer p { font-size: 0.875rem; font-style: italic; color: rgba(var(--color-text-base), 0.7); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.book-card {
  display: block; border-radius: 0.75rem; border: 1px solid rgba(var(--color-border), 0.5);
  opacity: 0; transform: translateY(1.5rem); transition: transform 500ms ease-out, border-color 500ms ease-out, box-shadow 500ms ease-out;
  animation: card-enter 0.6s ease-out forwards; animation-delay: var(--delay);
}
@keyframes card-enter { to { opacity: 1; transform: translateY(0); } }
.book-card:hover { border-color: rgba(var(--color-accent), 0.4); transform: translateY(-2px); box-shadow: 0 20px 40px -12px rgba(var(--color-accent), 0.15); }
.book-card-inner { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem; }
.book-cover { position: relative; flex-shrink: 0; width: 100%; height: 10rem; border-radius: 0.5rem; overflow: hidden; }
.book-cover-gradient { position: absolute; inset: 0; background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to)); transition: transform 0.4s ease; }
.book-card:hover .book-cover-gradient { transform: scale(1.05); }
.book-cover-content { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
svg.book-icon { width: 3rem; height: 3rem; fill: none; color: rgba(255, 255, 255, 0.8); transition: transform 0.3s ease; }
.book-card:hover svg.book-icon { transform: scale(1.1) rotate(-3deg); }
.book-info { display: flex; flex-direction: column; flex: 1; gap: 0.75rem; }
.book-header { display: flex; flex-direction: column; gap: 0.5rem; }
.book-title { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; transition: color 200ms; }
.book-card:hover .book-title { color: rgb(var(--color-accent)); }
.book-status { display: inline-flex; align-self: flex-start; align-items: center; padding: 0.125rem 0.625rem; border-radius: 9999px; font-size: 0.75rem; line-height: 1rem; font-weight: 500; white-space: nowrap; }
/* dobase-allow: DOB-DESIGN-RAW-COLOR the badge colors of the original site (Tailwind emerald/amber/slate) */
.status-complete { background: rgba(16, 185, 129, 0.2); color: #34d399; }
/* dobase-allow: DOB-DESIGN-RAW-COLOR the original site's amber badge */
.status-in-progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
/* dobase-allow: DOB-DESIGN-RAW-COLOR the original site's slate badge */
.status-coming-soon { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.book-description { font-size: 0.875rem; line-height: 1.625; color: rgba(var(--color-text-base), 0.85); }
.book-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: auto; }
.book-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.book-tag { padding: 0.125rem 0.5rem; font-size: 0.75rem; line-height: 1rem; border-radius: 0.375rem; background: rgba(var(--color-card), 0.6); color: rgba(var(--color-text-base), 0.85); }
.book-read-time { font-size: 0.75rem; line-height: 1rem; color: rgba(var(--color-text-base), 0.75); margin-left: auto; }
.book-cta { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.5rem; font-size: 0.875rem; font-weight: 500; color: rgb(var(--color-accent)); opacity: 0; transform: translateX(-8px); transition: opacity 300ms, transform 300ms; }
.book-card:hover .book-cta, .book-card:focus-visible .book-cta { opacity: 1; transform: translateX(0); }
svg.book-cta-arrow { width: 1rem; height: 1rem; fill: rgb(var(--color-accent)); transition: transform 0.2s ease; }
.book-card:hover svg.book-cta-arrow { transform: translateX(3px); }

/* ---------- post page ---------- */
.post-wrap { width: 100%; max-width: 56rem; }
.post-cover { display: block; width: 100%; margin-top: 1rem; border-radius: 0.5rem; }
.go-back-row { display: flex; justify-content: flex-start; padding: 0 0.5rem; }
.go-back { margin: 1.5rem 0 0.25rem; display: flex; align-items: center; min-height: 2.75rem; padding-right: 0.75rem; }
.go-back:hover { opacity: 0.75; }
.post-main { padding: 0 1rem 3rem; }
.post-title { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; color: rgb(var(--color-accent)); }
.prose { margin-top: 2rem; }
.newsletter-row { display: flex; justify-content: center; }

/* Article typography (the Tailwind Typography values the old site used). */
.prose { color: rgb(var(--color-text-base)); font-size: 1rem; line-height: 1.75; max-width: 100%; }
.page-main .prose { margin-top: 0; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 1.25em 0; }
.prose a { text-decoration: underline dashed; text-underline-offset: 8px; font-weight: 500; }
.prose a:hover { color: rgb(var(--color-accent)); }
.prose strong { font-weight: 600; }
.prose h2, .prose h3, .prose h4 { margin-bottom: 0.75rem; scroll-margin-top: 1rem; }
.prose h2 { font-size: 1.5em; margin-top: 2em; line-height: 1.333; font-weight: 700; color: rgba(var(--color-accent), 0.95); }
.prose h3 { font-size: 1.25em; margin-top: 1.6em; line-height: 1.6; font-weight: 400; color: rgb(var(--color-accent)); }
.prose h4 { margin-top: 1.5em; line-height: 1.5; font-weight: 600; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 1.625em; margin: 1.25em 0; overflow-x: clip; }
.prose ol { list-style: decimal; padding-left: 1.625em; margin: 1.25em 0; }
.prose li { margin: 0.5em 0; padding-left: 0.375em; }
.prose li::marker { color: rgb(var(--color-accent)); }
.prose li > ul, .prose li > ol { margin: 0.75em 0; }
.prose :not(pre) > code { border-radius: 0.25rem; background: rgba(var(--color-card), 0.75); padding: 0.25rem; font-size: 0.875em; font-weight: 600; }
.prose pre {
  /* dobase-allow: DOB-DESIGN-RAW-COLOR the One Dark code-block colors of the original site, the same in light and dark */
  background: #282c34; color: #abb2bf; border-radius: 0.375rem;
  padding: 0.857em 1.143em; margin: 1.7em 0; font-size: 0.875em; line-height: 1.714; overflow-x: auto;
}
.prose pre code, .prose pre code.hljs { background: transparent; padding: 0; font-size: inherit; font-weight: 400; white-space: pre; display: block; overflow-x: visible; }
/* dobase-allow: DOB-DESIGN-RAW-COLOR One Dark Pro's comment color: the atom-one-dark one is too faint to read on #282c34 */
.prose pre .hljs-comment, .prose pre .hljs-quote { color: #8b929e; }
.prose blockquote { border-left: 0.25rem solid rgba(var(--color-accent), 0.5); padding-left: 1em; margin: 1.6em 0; font-style: italic; opacity: 0.8; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.875em; line-height: 1.714; margin: 2em 0; }
.prose th, .prose td { border: 1px solid rgb(var(--color-border)); padding: 0.571em; text-align: left; }
.prose th { font-weight: 600; }
.prose img { margin: 0.5rem auto 2em; border: 2px solid rgb(var(--color-border)); }
.prose hr { border-top: 1px solid rgb(var(--color-border)); margin: 3em 0; }
.prose .toc { margin-top: 0; }
.prose .video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 1.5em 0; }
.prose .video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ---------- footer ---------- */
.site-footer { margin: auto auto 0; width: 100%; max-width: 56rem; padding: 0.5rem; }
.footer-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: space-between; column-gap: 1rem; padding: 1.5rem 0; }
.copyright-wrapper { margin: 0.5rem 0; display: flex; flex-direction: column; align-items: center; white-space: nowrap; }
.separator { display: none; }
.disclaimer { border-top: 1px solid rgb(var(--color-border)); border: 1px solid rgba(var(--color-border), 0.6); padding: 1rem; text-align: center; margin-bottom: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; }

/* ---------- 404 ---------- */
.not-found { margin: 0 auto; width: 100%; max-width: 64rem; padding: 4rem 1rem; text-align: center; }
.not-found h1 { font-size: 3rem; line-height: 1; font-weight: 700; color: rgb(var(--color-accent)); }
.not-found p { margin-top: 1rem; }

/* ---------- ≥ 640px ---------- */
@media (min-width: 640px) {
  .nav-container { flex-direction: row; }
  .top-nav-wrap { align-items: center; padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .logo { position: static; }
  #nav-menu { margin-left: 0.5rem; flex-direction: row; justify-content: flex-end; }
  .hamburger-menu { display: none; }
  #menu-items { display: flex; margin-top: 0; width: auto; column-gap: 1.25rem; }
  #menu-items li a { margin: 0; padding: 0.25rem 0.5rem; }
  #theme-btn { padding: 0.25rem; }
  #theme-btn svg, #theme-btn svg:hover { transform: none; }
  #theme-btn svg:hover { transform: rotate(12deg); }
  svg.icon-tabler { transform: scale(1.1); }
  .animate-link-button { padding: 0.25rem; }
  .hr { margin-bottom: 0.5rem; }
  .intro-row { flex-direction: row; }
  .social-wrapper { flex-direction: row; align-items: center; }
  .post-card-inner { flex-direction: row; }
  .post-card img { max-width: 11rem; }
  .post-card-body { padding: 0 1rem; }
  .page-main > h1 { font-size: 1.875rem; line-height: 2.25rem; }
  .books-title { font-size: 3rem; line-height: 1; }
  .book-card-inner { flex-direction: row; }
  .book-cover { width: 8rem; height: 11rem; }
  .book-header { flex-direction: row; align-items: center; }
  .footer-wrapper { flex-direction: row-reverse; padding: 1rem 0; }
  .copyright-wrapper { flex-direction: row; }
  .separator { display: inline; }
}
@media (min-width: 768px) {
  .post-wrap { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
