/* Jeff Lewis homepage — adaptive Catppuccin Latte and Mocha */
:root {
  color-scheme: light;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --crust: #dce0e8;
  --surface-0: #ccd0da;
  --surface-1: #bcc0cc;
  --overlay-0: #9ca0b0;
  --subtext-0: #6c6f85;
  --text: #4c4f69;
  --lavender: #7287fd;
  --sapphire: #209fb5;
  --on-accent: #11111b;
  --shell: 1080px;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;
    --surface-0: #313244;
    --surface-1: #45475a;
    --overlay-0: #6c7086;
    --subtext-0: #a6adc8;
    --text: #cdd6f4;
    --lavender: #b4befe;
    --sapphire: #74c7ec;
    --on-accent: #11111b;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body.landing-page {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.landing-page *,
.landing-page *::before,
.landing-page *::after {
  box-sizing: border-box;
}

.landing-page a {
  color: inherit;
}

.landing-page img {
  display: block;
  max-width: 100%;
}

.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page h4,
.landing-page h5,
.landing-page h6 {
  margin-top: 0;
  color: var(--text);
  line-height: 1.08;
  text-wrap: balance;
}

.landing-page p {
  text-wrap: pretty;
}

.landing-page :focus-visible {
  outline: 3px solid var(--sapphire);
  outline-offset: 4px;
}

.landing-page ::selection {
  background: var(--lavender);
  color: var(--on-accent);
}

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--sapphire);
  color: var(--on-accent);
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.landing-page .site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--surface-1) 65%, transparent);
  background: color-mix(in srgb, var(--base) 90%, transparent);
  backdrop-filter: blur(18px);
}

.nav-shell,
.brand,
.site-header nav,
.hero-actions,
.profile-links,
.text-links,
.footer-grid,
.site-footer nav,
.writing-heading {
  display: flex;
  align-items: center;
}

.nav-shell {
  min-height: 72px;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  gap: 11px;
  font-weight: 780;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.site-header nav {
  gap: clamp(18px, 3vw, 32px);
}

.site-header nav a {
  color: var(--subtext-0);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease;
}

.site-footer .footer-grid nav a,
.site-footer .footer-grid nav a:visited {
  color: var(--subtext-0);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease;
}

.site-header nav a:hover,
.site-footer .footer-grid nav a:hover,
.site-footer .footer-grid nav a:focus-visible {
  color: var(--sapphire);
}

.hero {
  min-height: 440px;
  padding-block: 72px 24px;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow,
.kicker {
  margin: 0 0 16px;
  color: var(--sapphire);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--sapphire);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--sapphire) 10%, transparent);
}

.landing-page h1 {
  margin-bottom: 18px;
  font-size: clamp(3.5rem, 7vw, 5.9rem);
  letter-spacing: -0.065em;
}

.landing-page h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  letter-spacing: -0.05em;
}



.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.profile-links {
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
}

.profile-links a {
  color: var(--subtext-0);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.profile-links a:hover {
  color: var(--sapphire);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 760;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.landing-page .button-primary {
  background: var(--lavender);
  color: var(--on-accent);
}

.button-primary:hover {
  background: var(--sapphire);
}

.button-secondary {
  border-color: var(--surface-1);
  background: color-mix(in srgb, var(--surface-0) 40%, transparent);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--lavender);
  color: var(--lavender);
}


/* Hide the retired summary strip if an older cached template references it. */
.facts {
  display: none !important;
}


.section {
  padding-block: clamp(72px, 9vw, 108px);
}

.about {
  padding-top: 48px;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 8vw, 100px);
}

.section-heading {
  max-width: 640px;
}

.about-copy {
  color: var(--subtext-0);
  font-size: 1.03rem;
}

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

.about-copy > p {
  max-width: 690px;
}

.focus-list {
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--surface-0);
  list-style: none;
}

.focus-list li {
  display: grid;
  grid-template-columns: minmax(145px, 0.55fr) minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-0);
}

.focus-list span {
  color: var(--overlay-0);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
}

.focus-list strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}

.text-links {
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 30px;
}

.text-links a,
.archive-link,
.empty-posts a {
  color: var(--lavender);
  font-weight: 700;
  text-decoration: none;
}

.text-links a:hover,
.archive-link:hover,
.empty-posts a:hover {
  color: var(--sapphire);
}

.writing {
  border-block: 1px solid var(--surface-0);
  background: var(--mantle);
}

.writing-heading {
  max-width: none;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.writing-heading h2,
.writing-heading .kicker {
  margin-bottom: 0;
}

.writing-heading .kicker {
  margin-bottom: 12px;
}

.archive-link {
  flex: 0 0 auto;
  font-size: 0.9rem;
}

.post-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--surface-0);
  list-style: none;
}

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

.post-list a {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 24px;
  padding: 20px 4px;
  text-decoration: none;
  transition: color 150ms ease, padding 150ms ease;
}

.post-list a:hover {
  padding-inline: 10px;
  color: var(--sapphire);
}

.post-list time {
  color: var(--overlay-0);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
}

.post-list a > span:nth-child(2) {
  color: var(--text);
  font-weight: 620;
}

.post-list a:hover > span:nth-child(2) {
  color: var(--sapphire);
}

.post-list a > span:last-child {
  color: var(--lavender);
}

.empty-posts {
  max-width: 650px;
  margin: 0;
  color: var(--subtext-0);
}

.landing-page .site-footer {
  border: 0;
  background: var(--crust);
}

.footer-grid {
  min-height: 92px;
  justify-content: space-between;
  gap: 28px;
}

.site-footer p {
  margin: 0;
  color: var(--overlay-0);
  font-size: 0.84rem;
}

.site-footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
  }



  .about {
    padding-top: 40px;
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .nav-shell {
    min-height: 64px;
  }

  .brand {
    gap: 9px;
    font-size: 0.92rem;
  }

  .brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .site-header nav {
    gap: 16px;
  }

  .site-header nav a {
    font-size: 0.82rem;
  }

  .site-header nav a:first-child {
    display: none;
  }

  .hero {
    padding-block: 48px 16px;
  }

  .landing-page h1 {
    font-size: clamp(3.25rem, 17vw, 4.5rem);
  }



  .section {
    padding-block: 68px;
  }

  .about {
    padding-top: 28px;
  }

  .focus-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .writing-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-list a {
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
  }

  .post-list time {
    grid-column: 1 / -1;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 26px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Shared inner-page theme */
body.site-page {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.site-page *,
.site-page *::before,
.site-page *::after {
  box-sizing: border-box;
}

.site-page a {
  color: var(--lavender);
  text-underline-offset: 0.18em;
}

.site-page a:hover {
  color: var(--sapphire);
}

.site-page img {
  max-width: 100%;
}

.site-page h1,
.site-page h2,
.site-page h3,
.site-page h4,
.site-page h5,
.site-page h6 {
  color: var(--text);
  line-height: 1.14;
  text-wrap: balance;
}

.site-page .site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--surface-1) 65%, transparent);
  background: color-mix(in srgb, var(--base) 90%, transparent);
  backdrop-filter: blur(18px);
}

.site-page .brand {
  color: var(--text);
}

.site-page .site-footer {
  border: 0;
  background: var(--crust);
}

.content-shell {
  min-height: calc(100vh - 164px);
  padding-block: clamp(58px, 8vw, 92px);
}

.document,
.listing,
.conversation {
  width: min(100%, 820px);
  margin-inline: auto;
}

.page-heading {
  margin-bottom: clamp(38px, 6vw, 60px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--surface-0);
}

.page-heading .kicker {
  margin-bottom: 14px;
}

.page-heading h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: -0.06em;
}

.page-heading > p:last-child {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--subtext-0);
  font-size: 1.02rem;
}

.post-date {
  display: inline-block;
  margin-top: 20px;
  color: var(--subtext-0);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  text-decoration: none;
}

.prose {
  color: var(--subtext-0);
  font-size: 1.02rem;
}

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

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

.prose h2 {
  margin: 3.25rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-0);
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  letter-spacing: -0.04em;
}

.prose h3 {
  margin: 2.4rem 0 0.75rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  letter-spacing: -0.025em;
}

.prose h2 > a,
.prose h3 > a {
  color: inherit;
  text-decoration: none;
}

.prose h4 {
  margin: 1.8rem 0 0.7rem;
  color: var(--sapphire);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin-block: 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li {
  margin-block: 0.45rem;
  padding-left: 0.2rem;
}

.prose strong {
  color: var(--text);
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.2rem;
  border-left: 3px solid var(--lavender);
  color: var(--subtext-0);
}

.prose code {
  padding: 0.15em 0.35em;
  border: 1px solid var(--surface-0);
  border-radius: 5px;
  background: var(--mantle);
  color: var(--text);
  font-size: 0.88em;
}

.prose pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--surface-0);
  border-radius: 10px;
  background: var(--mantle);
}

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

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.prose th,
.prose td {
  min-width: 130px;
  padding: 10px 12px;
  border: 1px solid var(--surface-0);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--mantle);
  color: var(--text);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
}

.category-list a {
  padding: 6px 11px;
  border: 1px solid var(--surface-0);
  border-radius: 999px;
  color: var(--subtext-0);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.archive-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--surface-0);
  list-style: none;
}

.archive-list li {
  border-bottom: 1px solid var(--surface-0);
}

.archive-list a {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 22px;
  padding: 20px 4px;
  text-decoration: none;
  transition: color 150ms ease, padding 150ms ease;
}

.archive-list a:hover {
  padding-inline: 10px;
}

.archive-list time {
  color: var(--overlay-0);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
}

.archive-list .p-summary {
  color: var(--text);
  font-weight: 620;
}

.archive-list a:hover .p-summary {
  color: var(--sapphire);
}

.archive-feed {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-card {
  overflow: hidden;
  border: 1px solid var(--surface-0);
  border-radius: 14px;
  background: var(--mantle);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--crust) 28%, transparent);
}

.archive-card-header {
  padding: 24px 26px 0;
}

.archive-card-header .u-url {
  color: var(--overlay-0);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  text-decoration: none;
}

.archive-card-header h2 {
  margin: 10px 0 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.035em;
}

.archive-card-header h2 a,
.archive-card-header h2 a:visited {
  color: var(--text);
  text-decoration: none;
}

.archive-card-header h2 a:hover {
  color: var(--sapphire);
}

.archive-preview {
  position: relative;
  overflow: hidden;
  max-height: 30rem;
  margin: 20px 26px 0;
}

.archive-preview.is-complete {
  max-height: none;
}

.archive-preview.is-truncated::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 110px;
  background: linear-gradient(to bottom, transparent, var(--mantle));
  content: "";
  pointer-events: none;
}

.archive-entry-content {
  color: var(--subtext-0);
  font-size: 1rem;
  line-height: 1.7;
}

.archive-entry-content > :first-child {
  margin-top: 0;
}

.archive-entry-content > :last-child {
  margin-bottom: 0;
}

.archive-entry-content p,
.archive-entry-content ul,
.archive-entry-content ol,
.archive-entry-content blockquote,
.archive-entry-content pre {
  margin-block: 0 1rem;
}

.archive-entry-content h2,
.archive-entry-content h3,
.archive-entry-content h4 {
  margin: 1.8rem 0 0.75rem;
  color: var(--text);
}

.archive-entry-content a {
  color: var(--lavender);
  overflow-wrap: anywhere;
}

.archive-entry-content a:visited {
  color: var(--lavender);
}

.archive-entry-content a:hover {
  color: var(--sapphire);
}

.archive-entry-content .invisible {
  display: none;
}

.archive-entry-content img,
.archive-entry-content video,
.archive-entry-content iframe {
  display: block;
  max-width: 100%;
  height: auto;
  margin-block: 18px;
  border: 0;
  border-radius: 10px;
}

.archive-entry-content iframe {
  width: 100%;
  min-height: 320px;
}

.archive-entry-content blockquote {
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--lavender);
}

.archive-entry-content pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--surface-0);
  border-radius: 8px;
  background: var(--base);
}

.archive-card-footer {
  margin-top: 22px;
  padding: 18px 26px;
  border-top: 1px solid var(--surface-0);
}

.archive-card-footer a,
.archive-card-footer a:visited {
  color: var(--lavender);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.archive-card-footer a:hover {
  color: var(--sapphire);
}

.archive-older {
  margin-top: 34px;
  border: 1px solid var(--surface-0);
  border-radius: 14px;
  background: var(--mantle);
}

.archive-older summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.archive-older summary::-webkit-details-marker {
  display: none;
}

.archive-older summary::after {
  color: var(--lavender);
  content: "+";
}

.archive-older[open] summary::after {
  content: "−";
}

.archive-older .archive-list {
  margin: 0 26px 26px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 32px;
  color: var(--overlay-0);
  font-size: 0.84rem;
}

.pagination a {
  font-weight: 700;
  text-decoration: none;
}

.syndication,
.conversation {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-0);
  color: var(--subtext-0);
  font-size: 0.86rem;
}

@media (max-width: 640px) {
  .content-shell {
    padding-block: 46px 64px;
  }

  .page-heading {
    margin-bottom: 32px;
    padding-bottom: 22px;
  }

  .page-heading h1 {
    font-size: clamp(2.55rem, 13vw, 3.75rem);
  }

  .prose {
    font-size: 0.98rem;
  }

  .prose h2 {
    margin-top: 2.7rem;
  }

  .archive-list a {
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
    padding-block: 17px;
  }

  .archive-list time {
    grid-column: 1 / -1;
  }

  .archive-feed {
    gap: 20px;
  }

  .archive-card-header {
    padding: 20px 18px 0;
  }

  .archive-preview {
    max-height: 24rem;
    margin: 16px 18px 0;
  }

  .archive-entry-content {
    font-size: 0.96rem;
  }

  .archive-entry-content iframe {
    min-height: 220px;
  }

  .archive-card-footer {
    margin-top: 18px;
    padding: 16px 18px;
  }

  .archive-older summary {
    padding: 18px;
  }

  .archive-older .archive-list {
    margin: 0 18px 18px;
  }

}
