
@import "https://unpkg.com/@lumeland/ds@0.5.2/ds.css";
/* Lume's design system */
/* Custom components */
.navbar {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  row-gap: 1rem;
  justify-content: space-between;
  padding: 2rem min(5vw, 5rem);
  align-items: center;
}
.navbar-links {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  font: var(--font-ui-bold);
  align-items: center;

  & [aria-current="page"] {
    text-decoration: none;
  }
}
.navbar-search {
  padding: 0 1em;
  margin-left: auto;
  display: flex;
  align-items: center;
}
.navbar-home {
  text-decoration: none;
}
.page-header {
  margin-bottom: var(--row-gap-medium);

  & > p:first-child {
    margin-top: 0;
  }
}
.page-title {
  font: var(--font-display);
  letter-spacing: var(--font-display-spacing);
  margin: 0;
  text-wrap: balance;
  color: var(--color-base);
}
.gradient-love {
  background: var(--gradient-love-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.page-navigation {
  margin-bottom: var(--row-gap-medium);

  & ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
  }

  & h2 {
    font: var(--font-body-bold);
    letter-spacing: var(--font-body-spacing);
    margin: 0.5em 0;
  }
}
.page-pagination {
  border-top: solid 1px var(--color-line);
  margin-top: var(--row-gap-medium);
}
.page-pagination a {
  padding: 0.5em 0;
}
.page-pagination a:hover,
[data-theme="dark"] .page-pagination a:hover {
  background: none;
  color: var(--color-dim);
}
/* Code styling with brand colors */
:not(pre) > code {
  background: rgba(254, 170, 219, 0.03);
  border: 1px solid rgba(254, 170, 219, 0.1);
  border-radius: 0.375em;
  padding: 0.125em 0.375em;
  font-family: var(--font-family-code);
  font-size: 0.875em;
  color: #608CFA;
}
pre {
  position: relative;
  background: rgba(254, 170, 219, 0.03);
  border: 1px solid rgba(254, 170, 219, 0.1);
  border-radius: 0.5em;
  padding: 1em 1.25em;
  margin: 1em 0;
  overflow-x: auto;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875em;
  line-height: 1.6;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 2px solid var(--color-line);
  background: var(--color-bg);
  cursor: pointer;
  color: var(--color-dim);
  opacity: 0;
  transition: opacity 0.15s;
  appearance: none;
  -webkit-appearance: none;
  line-height: 0;
  font-size: 0;
  border-radius: 6px;
}
.copy-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
}
pre:hover .copy-btn {
  opacity: 1;
}
.copy-btn:hover {
  border-color: transparent;
  background:
    linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
    var(--gradient-love-text) border-box;
  color: var(--color-base);
}
/* Dark theme adjustments */
[data-theme="dark"] :not(pre) > code {
  background: rgba(254, 170, 219, 0.04);
  border-color: rgba(254, 170, 219, 0.15);
  color: #7AA3FF;
}
[data-theme="dark"] pre {
  background: rgba(254, 170, 219, 0.04);
  border-color: rgba(254, 170, 219, 0.15);
}
/* Blockquote styling */
blockquote {
  margin: 1em 0;
  padding: 0.75em 1em;
  border-left: 3px solid #608CFA;
  background: rgba(254, 170, 219, 0.05);
  color: var(--color-dim);
}
blockquote p {
  margin: 0.25em 0 0.25em 0;
}
blockquote p:first-child {
  margin-top: 0;
}
blockquote p:last-child {
  margin-bottom: 0;
}
blockquote code {
  background: rgba(254, 170, 219, 0.1);
  border: 1px solid rgba(254, 170, 219, 0.15);
  padding: 0.125em 0.375em;
  border-radius: 0.375em;
  font-size: 0.9em;
}
[data-theme="dark"] blockquote {
  background: rgba(254, 170, 219, 0.06);
  border-left-color: #7AA3FF;
  color: #B0B0B0;
}
[data-theme="dark"] blockquote code {
  background: rgba(254, 170, 219, 0.15);
  border-color: rgba(254, 170, 219, 0.25);
}
/* Links - underline on hover */
a {
  text-decoration: underline;
  text-decoration-color: rgba(96, 140, 250, 0.4);
}
a:hover {
  color: #FEAADB;
  text-decoration-color: #FEAADB;
}
[data-theme="dark"] a:hover {
  background-color: rgba(254, 170, 219, 0.1);
}
/* Text selection */
::selection {
  background-color: rgba(254, 170, 219, 0.2);
}
.postList {
  list-style: none;
  padding: 0;

  & article.post + article.post {
    margin-top: var(--row-gap-medium);
  }
  & li.post + li.post {
    margin-top: var(--row-gap-small);
  }

  & .post-header {
    margin-bottom: var(--row-gap-xsmall);
  }

  & .post-details {
    font: var(--font-small);
  }

  & .post-title {
    font: var(--font-title);
    letter-spacing: var(--font-title-spacing);
    display: block;

    & a {
      text-decoration: none;
    }
  }
}
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-family-display);
  font-weight: 400;
}
.post-header {
  margin-bottom: var(--row-gap-small);
}
.post-title {
  font: var(--font-display);
  letter-spacing: var(--font-display-spacing);
  margin: 0 0 0.2em;
  text-wrap: balance;
  color: var(--color-base);
}
.post-title a:hover {
  opacity: 0.7;
}
.post-details {
  display: flex;
  flex-flow: row wrap;
  row-gap: 1em;
  column-gap: 0.5em;
  align-items: center;
  font: var(--font-small);
  color: var(--color-dim);

  & p {
    margin: 0;
  }

  & p::after {
    content: "•";
    padding-left: 0.5em;
    align-self: stretch;
  }

  & p:last-of-type {
    margin-right: 0.5em;

    &::after {
      display: none;
    }
  }

  & a {
    color: inherit;
  }
}
.post-tags {
  display: flex;
  flex-flow: row wrap;
  gap: 0.5em;
  align-items: center;
}
.post-tags a {
  border: 2px solid transparent;
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
              var(--gradient-love-text) border-box;
  color: var(--color-base);
  padding: 0.2em 0.6em;
  border-radius: 1em;
  text-decoration: none;
  font-size: 0.85em;
  transition: all 0.2s ease;
  opacity: 0.5;
}
.post-tags a:hover {
  opacity: 1;
}
.post-link {
  display: inline-block;
}
/* On a project, the title is on the left and the source link on the right, with
   the metadata underneath like on a post. */
.project-header {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 1em;
  margin-bottom: 0.2em;

  & .post-title {
    margin-bottom: 0;
  }
}
/* The source link keeps the tag pill look, a little larger. */
.project-source {
  display: flex;
  align-items: center;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
    var(--gradient-love-text) border-box;
  color: var(--color-base);
  padding: 0.35em 0.9em;
  border-radius: 1em;
  text-decoration: none;
  font-size: 1em;
  transition: all 0.2s ease;
  opacity: 0.5;
}
.project-source:hover {
  opacity: 1;
}
.project-banner {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--row-gap-small);
  border-radius: 1em;
}
.comments-section {
  margin-top: 5em;
}
.comments-header {
  & h2 {
    font: var(--font-title);
    letter-spacing: var(--font-title-spacing);
    margin: 0;
    color: var(--color-base);
  }
  & p {
    font: var(--font-ui);
    color: var(--color-dim);
    margin: 0.5em 0;
  }
}
.comments {
  display: block;
  padding: 2em;
  margin-top: 2em;
  background: var(--color-highlight);
  border-radius: var(--border-radius);
  border: solid 1px var(--color-line);
  color: var(--color-dim);
  font: var(--font-small);

  @media (max-width: 450px) {
    margin-left: calc(-15vw / 2);
    margin-right: calc(-15vw / 2);
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: calc(15vw / 2);
  }

  & a {
    color: currentColor;
  }

  & ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  & li {
    container-type: inline-size;

    ul {
      margin-top: 2em;
      padding-top: 2em;
      border-top: solid 1px var(--color-line);
      margin-left: min(var(--indent), 10cqw);
    }
  }

  & li + li {
    margin-top: 2em;
    padding-top: 2em;
    border-top: solid 1px var(--color-line);
  }
  & article {
    max-width: 600px;
  }
  > ul {
    --avatar-size: clamp(32px, 10cqw, 50px);
    --indent: calc(var(--avatar-size) + 15px);
  }

  .comment-avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 6px;
    float: left;
    margin-right: 14px;
    box-shadow: 0 0 1px #0009;
  }
  .comment-user {
    text-decoration: none;
    display: block;
    position: relative;
  }
  .comment-author {
    position: absolute;
    left: calc(var(--avatar-size) - 15px);
    top: calc(var(--avatar-size) - 15px);
    background: var(--color-highlight);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
  }
  .comment-user:hover .comment-username {
    text-decoration: underline;
  }
  .comment-username {
    margin-right: 0.5em;
    color: var(--color-text);
  }
  .comment-useraddress {
    font-style: normal;
  }
  .comment-time {
    font-size: small;
    display: flex;
    column-gap: 0.3em;
    align-items: center;

    svg {
      width: 1em;
      height: 1em;
      fill: currentColor;
    }
  }
  .comment-address {
    color: currentColor;
    text-decoration: none;
    display: block;
    padding-left: var(--indent);
    margin-top: 0.2em;
  }
  .comment-address:hover {
    text-decoration: underline;
  }
  .comment-body {
    margin-top: 1em;
    margin-left: var(--indent);
    line-height: 1.5;

    .invisible {
      display: none;
    }
    .ellipsis::after {
      content: "…";
    }
    .mention {
      text-decoration: none;
      color: var(--color-text);

      &:hover {
        text-decoration: underline;
      }
    }
  }
  .comment-body p {
    margin: 0.5em 0 0;
  }
  .comment-counts {
    display: flex;
    column-gap: 1em;
    font-size: small;

    & svg {
      color: var(--color-primary);
    }
  }
  .comment-counts > span {
    display: flex;
    align-items: center;
    column-gap: 0.3em;
  }
}
/* Custom gradient for text */
:root {
  --gradient-love-text: linear-gradient(135deg, #FEAADB, #F5EEDC, #608CFA);
  --color-pink: #FEAADB;
  --color-cream: #F5EEDC;
  --color-blue: #608CFA;
}
/* Cream background for light and dark themes */
:root {
  --color-bg: #FAF8F3;
}
[data-theme="dark"] {
  --color-bg: #121318;
}
/* Make the links black */
:root {
  --color-link: var(--color-base);
  --color-link-hover: var(--color-dim);
}
/* Page layout */
body {
  background-color: var(--color-bg);
}
main {
  padding: var(--row-gap-medium) 0;
  max-width: min(100% - 15vw, 45em);
  margin: 0 auto;

  & > :first-child {
    margin-top: 0;
  }
}
/* Search tweak */
.search {
  margin-top: var(--row-gap-xsmall);
}
/* Override shiki CSS to use [data-theme] instead of prefers-color-scheme */
.shiki,
.shiki span {
  background-color: var(--shiki-light-bg) !important;
  color: var(--shiki-light) !important;
}
[data-theme="dark"] .shiki,
[data-theme="dark"] .shiki span {
  background-color: var(--shiki-dark-bg) !important;
  color: var(--shiki-dark) !important;
}
/* Google Fonts override */
:root {
  --font-family-display: "Geist Pixel", sans-serif;
  --font-family-ui: "Geist", sans-serif;
  --font-family-code: "JetBrains Mono", monospace;
  --font-title: var(--font-bold) clamp(1.5rem,8vw,2rem)/1.2 var(--font-family-display);
}
@supports (font-variation-settings: normal) {
  :root {
    --font-family-display: "Geist Pixel", sans-serif;
    --font-family-ui: "Geist", sans-serif;
  }
}

/* latin-ext */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-normal-100-900-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

/* latin */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: normal;
  src: url("fonts/geist-normal-100-900-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

/* latin-ext */
@font-face {
  font-family: "Geist Pixel";
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
  src: url("fonts/geist-pixel-normal-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

/* latin */
@font-face {
  font-family: "Geist Pixel";
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
  src: url("fonts/geist-pixel-normal-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

/* latin-ext */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-stretch: normal;
  src: url("fonts/jetbrains-mono-normal-100-800-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

/* latin */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-stretch: normal;
  src: url("fonts/jetbrains-mono-normal-100-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}
